dovecot-1.2: Transaction view: If index is reset, lookup_first()...

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 22 23:50:42 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/c0888db40086
changeset: 8215:c0888db40086
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 22 23:50:38 2008 +0300
description:
Transaction view: If index is reset, lookup_first() shouldn't return old sequences.

diffstat:

1 file changed, 7 insertions(+), 3 deletions(-)
src/lib-index/mail-index-transaction-view.c |   10 +++++++---

diffs (20 lines):

diff -r 76425554b4bc -r c0888db40086 src/lib-index/mail-index-transaction-view.c
--- a/src/lib-index/mail-index-transaction-view.c	Mon Sep 22 23:49:33 2008 +0300
+++ b/src/lib-index/mail-index-transaction-view.c	Mon Sep 22 23:50:38 2008 +0300
@@ -168,9 +168,13 @@ static void tview_lookup_first(struct ma
 	unsigned int append_count;
 	uint32_t seq, message_count;
 
-	tview->super->lookup_first(view, flags, flags_mask, seq_r);
-	if (*seq_r != 0)
-		return;
+	if (!tview->t->reset) {
+		tview->super->lookup_first(view, flags, flags_mask, seq_r);
+		if (*seq_r != 0)
+			return;
+	} else {
+		*seq_r = 0;
+	}
 
 	rec = array_get(&tview->t->appends, &append_count);
 	seq = tview->t->first_new_seq;


More information about the dovecot-cvs mailing list