dovecot-2.2: lib-storage: Don't try to sync private index files ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 4 12:37:16 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/e59dfda2a02f
changeset: 14706:e59dfda2a02f
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 04 12:37:02 2012 +0300
description:
lib-storage: Don't try to sync private index files if syncing already failed.
This fixes a crash when opening a mailbox failed.

diffstat:

 src/lib-storage/index/index-sync.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 5d3bc8a98e46 -r e59dfda2a02f src/lib-storage/index/index-sync.c
--- a/src/lib-storage/index/index-sync.c	Wed Jul 04 11:19:44 2012 +0300
+++ b/src/lib-storage/index/index-sync.c	Wed Jul 04 12:37:02 2012 +0300
@@ -184,14 +184,14 @@
 	ctx->ctx.box = box;
 	ctx->ctx.flags = flags;
 
-	/* sync private index if needed */
-	(void)index_storage_mailbox_sync_pvt(box);
-
 	if (failed) {
 		ctx->failed = TRUE;
 		return &ctx->ctx;
 	}
 
+	/* sync private index if needed */
+	(void)index_storage_mailbox_sync_pvt(box);
+
 	if ((flags & MAILBOX_SYNC_FLAG_NO_EXPUNGES) != 0)
 		sync_flags |= MAIL_INDEX_VIEW_SYNC_FLAG_NOEXPUNGES;
 


More information about the dovecot-cvs mailing list