From 27def927798e072826f1dbd70dcc52fdb2a878c2 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 3 Apr 2001 21:32:52 +0000 Subject: 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 --- camel/providers/imap/camel-imap-folder.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'camel/providers/imap') 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); -- cgit v1.2.3