dovecot-1.2: Transaction view: If index is reset, don't return o...

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/76425554b4bc
changeset: 8214:76425554b4bc
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 22 23:49:33 2008 +0300
description:
Transaction view: If index is reset, don't return old to-be-removed sequences.

diffstat:

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

diffs (20 lines):

diff -r ffefb9074966 -r 76425554b4bc src/lib-index/mail-index-transaction-view.c
--- a/src/lib-index/mail-index-transaction-view.c	Mon Sep 22 23:46:07 2008 +0300
+++ b/src/lib-index/mail-index-transaction-view.c	Mon Sep 22 23:49:33 2008 +0300
@@ -109,8 +109,14 @@ static void tview_lookup_seq_range(struc
 	const struct mail_index_record *rec;
 	uint32_t seq;
 
-	tview->super->lookup_seq_range(view, first_uid, last_uid,
-				       first_seq_r, last_seq_r);
+	if (!tview->t->reset) {
+		tview->super->lookup_seq_range(view, first_uid, last_uid,
+					       first_seq_r, last_seq_r);
+	} else {
+		/* index is being reset. we never want to return old
+		   sequences. */
+		*first_seq_r = *last_seq_r = 0;
+	}
 	if (tview->t->last_new_seq == 0) {
 		/* no new messages, the results are final. */
 		return;


More information about the dovecot-cvs mailing list