dovecot-2.1: lib-index: Don't allow syncing to begin if index is...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 7 11:30:15 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/9815d3292470
changeset: 13422:9815d3292470
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Sep 07 11:30:05 2011 +0300
description:
lib-index: Don't allow syncing to begin if index is marked corrupted.

diffstat:

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

diffs (16 lines):

diff -r 4b707b98176e -r 9815d3292470 src/lib-index/mail-index-sync.c
--- a/src/lib-index/mail-index-sync.c	Wed Sep 07 11:19:03 2011 +0300
+++ b/src/lib-index/mail-index-sync.c	Wed Sep 07 11:30:05 2011 +0300
@@ -434,6 +434,12 @@
 
 	i_assert(!index->syncing);
 
+	if (index->map != NULL &&
+	    (index->map->hdr.flags & MAIL_INDEX_HDR_FLAG_CORRUPTED) != 0) {
+		/* index is corrupted and need to be reopened */
+		return -1;
+	}
+
 	if (log_file_seq != (uint32_t)-1)
 		flags |= MAIL_INDEX_SYNC_FLAG_REQUIRE_CHANGES;
 


More information about the dovecot-cvs mailing list