dovecot-2.0: mdbox: Fixed crashing when marking mdbox corrupted ...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jun 13 17:40:56 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/b6163de8dffa
changeset: 11539:b6163de8dffa
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jun 13 15:40:57 2010 +0100
description:
mdbox: Fixed crashing when marking mdbox corrupted and mdbox map had open transactions.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-map.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r aa66db4073c5 -r b6163de8dffa src/lib-storage/index/dbox-multi/mdbox-map.c
--- a/src/lib-storage/index/dbox-multi/mdbox-map.c	Sun Jun 13 15:40:10 2010 +0100
+++ b/src/lib-storage/index/dbox-multi/mdbox-map.c	Sun Jun 13 15:40:57 2010 +0100
@@ -189,6 +189,11 @@
 		mail_index_reset_error(map->index);
 		return -1;
 	}
+	if (mail_index_view_get_transaction_count(map->view) > 0) {
+		/* can't sync when there are transactions */
+		return 0;
+	}
+
 	ctx = mail_index_view_sync_begin(map->view,
 				MAIL_INDEX_VIEW_SYNC_FLAG_FIX_INCONSISTENT);
 	if (mail_index_view_sync_commit(&ctx, &delayed_expunges) < 0) {


More information about the dovecot-cvs mailing list