dovecot-2.2: imapc: Don't assert-crash when trying to sync a mai...

dovecot at dovecot.org dovecot at dovecot.org
Fri Mar 27 13:13:52 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/ee8934a2a7f4
changeset: 18389:ee8934a2a7f4
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Mar 27 15:12:50 2015 +0200
description:
imapc: Don't assert-crash when trying to sync a mailbox with MAILBOX_FLAG_SAVEONLY.
We can just skip the sync, because we don't do anything except save mails.

diffstat:

 src/lib-storage/index/imapc/imapc-sync.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r c34724e1c08b -r ee8934a2a7f4 src/lib-storage/index/imapc/imapc-sync.c
--- a/src/lib-storage/index/imapc/imapc-sync.c	Fri Mar 27 14:31:01 2015 +0200
+++ b/src/lib-storage/index/imapc/imapc-sync.c	Fri Mar 27 15:12:50 2015 +0200
@@ -488,6 +488,11 @@
 	struct imapc_sync_context *sync_ctx;
 	bool force = mbox->sync_fetch_first_uid != 0;
 
+	if ((mbox->box.flags & MAILBOX_FLAG_SAVEONLY) != 0) {
+		/* we're only saving mails here - no syncing actually wanted */
+		return 0;
+	}
+
 	if (imapc_sync_begin(mbox, &sync_ctx, force) < 0)
 		return -1;
 	if (sync_ctx == NULL)


More information about the dovecot-cvs mailing list