aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-folder.c12
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);