dovecot-2.2: lib-index: Previous commit sometimes broke scanning...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 6 23:59:50 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/62874b472dc6
changeset: 16342:62874b472dc6
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 06 23:59:41 2013 +0300
description:
lib-index: Previous commit sometimes broke scanning transaction log view.
If min_file_seq+offset pointed to the end of the previous file that no
longer existed, we didn't just skip over it.

diffstat:

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

diffs (21 lines):

diff -r 0a97502855df -r 62874b472dc6 src/lib-index/mail-transaction-log-view.c
--- a/src/lib-index/mail-transaction-log-view.c	Mon May 06 20:21:27 2013 +0300
+++ b/src/lib-index/mail-transaction-log-view.c	Mon May 06 23:59:41 2013 +0300
@@ -95,6 +95,17 @@
 	}
 
 	for (file = view->log->files; file != NULL; file = file->next) {
+		if (file->hdr.prev_file_seq == min_file_seq)
+			break;
+	}
+
+	if (file != NULL && min_file_offset == file->hdr.prev_file_offset) {
+		/* we can (and sometimes must) skip to the next file */
+		min_file_seq = file->hdr.file_seq;
+		min_file_offset = file->hdr.hdr_size;
+	}
+
+	for (file = view->log->files; file != NULL; file = file->next) {
 		if (file->hdr.prev_file_seq == max_file_seq)
 			break;
 	}


More information about the dovecot-cvs mailing list