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

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 22 23:49:13 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/471b0096b579
changeset: 7894:471b0096b579
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 22 23:49:09 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 c88b67c8ebdb -r 471b0096b579 src/lib-index/mail-index-transaction-view.c
--- a/src/lib-index/mail-index-transaction-view.c	Mon Sep 22 23:45:51 2008 +0300
+++ b/src/lib-index/mail-index-transaction-view.c	Mon Sep 22 23:49:09 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