From: Timo Sirainen Date: Mon, 22 Sep 2008 20:49:33 +0000 (+0300) Subject: Transaction view: If index is reset, don't return old to-be-removed sequences. X-Git-Tag: 1.2.alpha2~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f37a808b678da97c3995c56261173a5528b1df6;p=thirdparty%2Fdovecot%2Fcore.git Transaction view: If index is reset, don't return old to-be-removed sequences. --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-transaction-view.c b/src/lib-index/mail-index-transaction-view.c index 05a62a18a3..3f1acc53ad 100644 --- a/src/lib-index/mail-index-transaction-view.c +++ b/src/lib-index/mail-index-transaction-view.c @@ -109,8 +109,14 @@ static void tview_lookup_seq_range(struct mail_index_view *view, 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;