diff options
author | Dan Winship <danw@src.gnome.org> | 2001-04-04 05:32:52 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-04-04 05:32:52 +0800 |
commit | 27def927798e072826f1dbd70dcc52fdb2a878c2 (patch) | |
tree | 1d322d0a4eaacdabff6b5523c41444e0a32afe0b /camel | |
parent | 942539cd7ddae996696d71627687074deeabb8ef (diff) | |
download | gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.tar gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.tar.gz gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.tar.bz2 gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.tar.lz gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.tar.xz gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.tar.zst gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.zip |
If we don't change any flags or expunge, send a NOOP to give the server a
* providers/imap/camel-imap-folder.c (imap_sync): If we don't
change any flags or expunge, send a NOOP to give the server a
chance to send EXISTS, etc, messages.
svn path=/trunk/; revision=9142
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7f17b7aef3..bc15521a81 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-04-03 Dan Winship <danw@ximian.com> + + * providers/imap/camel-imap-folder.c (imap_sync): If we don't + change any flags or expunge, send a NOOP to give the server a + chance to send EXISTS, etc, messages. + 2001-04-02 Dan Winship <danw@ximian.com> * camel-service.h: Remove the "quick_login" member, which is diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 67739e7e46..0a8f0edd66 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -501,7 +501,7 @@ static void imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex) { CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store); - CamelImapResponse *response; + CamelImapResponse *response = NULL; CamelMessageInfo *info; GPtrArray *matches; char *set, *flaglist; @@ -591,6 +591,16 @@ imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex) camel_imap_response_free (response); } + if (!response) { + /* We didn't sync or expunge anything... Do a noop so + * the server gets a chance to tell us any news it has. + */ + CAMEL_IMAP_STORE_LOCK(store, command_lock); + response = camel_imap_command (store, folder, ex, "NOOP"); + CAMEL_IMAP_STORE_UNLOCK(store, command_lock); + camel_imap_response_free (response); + } + camel_folder_summary_save (folder->summary); camel_operation_end(NULL); |