dovecot-2.0: lib-index: Fix to recent error handling change.

dovecot at dovecot.org dovecot at dovecot.org
Tue May 25 19:34:59 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/fb1cc2f5d681
changeset: 11368:fb1cc2f5d681
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 25 17:34:56 2010 +0100
description:
lib-index: Fix to recent error handling change.

diffstat:

 src/lib-index/mail-transaction-log-view.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (37 lines):

diff -r 61c3124bba93 -r fb1cc2f5d681 src/lib-index/mail-transaction-log-view.c
--- a/src/lib-index/mail-transaction-log-view.c	Tue May 25 16:45:18 2010 +0100
+++ b/src/lib-index/mail-transaction-log-view.c	Tue May 25 17:34:56 2010 +0100
@@ -202,16 +202,6 @@
 	}
 	i_assert(min_file_offset >= view->tail->hdr.hdr_size);
 
-	if (min_file_seq == view->head->hdr.file_seq &&
-	    min_file_offset > view->head->sync_offset) {
-		/* log file offset is probably corrupted in the index file. */
-		mail_transaction_log_view_set_corrupted(view,
-			"file_seq=%u, min_file_offset (%"PRIuUOFF_T
-			") > sync_offset (%"PRIuUOFF_T")", min_file_seq,
-			min_file_offset, view->head->sync_offset);
-		return -1;
-	}
-
 	/* we have all of them. update refcounts. */
 	mail_transaction_log_view_unref_all(view);
 
@@ -262,6 +252,16 @@
 		}
 	}
 
+	if (min_file_seq == view->head->hdr.file_seq &&
+	    min_file_offset > view->head->sync_offset) {
+		/* log file offset is probably corrupted in the index file. */
+		mail_transaction_log_view_set_corrupted(view,
+			"file_seq=%u, min_file_offset (%"PRIuUOFF_T
+			") > sync_offset (%"PRIuUOFF_T")", min_file_seq,
+			min_file_offset, view->head->sync_offset);
+		return -1;
+	}
+
 	i_assert(max_file_seq == (uint32_t)-1 ||
 		 max_file_seq == view->head->hdr.file_seq);
 	i_assert(max_file_offset == (uoff_t)-1 ||


More information about the dovecot-cvs mailing list