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/providers/imap/camel-imap-folder.c | |
parent | 942539cd7ddae996696d71627687074deeabb8ef (diff) | |
download | gsoc2013-evolution-27def927798e072826f1dbd70dcc52fdb2a878c2.tar.gz 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/providers/imap/camel-imap-folder.c')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 12 |
1 files changed, 11 insertions, 1 deletions
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); |