changeset 22001:3acdf933fc65

imapc: Don't send NOOP on sync if MAILBOX_SYNC_FLAG_FAST is set Fast syncing should do only the minimal amount of work.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 26 Apr 2017 23:13:20 +0300
parents 641bf40ea9ee
children 3379efac6f8a
files src/lib-storage/index/imapc/imapc-sync.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-sync.c	Wed Apr 26 15:04:23 2017 +0300
+++ b/src/lib-storage/index/imapc/imapc-sync.c	Wed Apr 26 23:13:20 2017 +0300
@@ -547,8 +547,9 @@
 	if (!mbox->initial_sync_done) {
 		/* we just SELECTed/EXAMINEd the mailbox, don't do another
 		   NOOP. */
-	} else if ((mbox->capabilities & IMAPC_CAPABILITY_IDLE) == 0 ||
-		   (flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0) {
+	} else if ((flags & MAILBOX_SYNC_FLAG_FAST) == 0 &&
+		   ((mbox->capabilities & IMAPC_CAPABILITY_IDLE) == 0 ||
+		    (flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0)) {
 		/* do NOOP to make sure we have the latest changes before
 		   starting sync. this is necessary either because se don't
 		   support IDLE at all, or because we want to be sure that we