From: Timo Sirainen Date: Mon, 22 Sep 2008 20:50:38 +0000 (+0300) Subject: Transaction view: If index is reset, lookup_first() shouldn't return old sequences. X-Git-Tag: 1.2.alpha2~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=977fcb5a2e43c1e8db40b2d58fb6dc0e41d9d019;p=thirdparty%2Fdovecot%2Fcore.git Transaction view: If index is reset, lookup_first() shouldn't return old 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 3f1acc53ad..d2abe99e4f 100644 --- a/src/lib-index/mail-index-transaction-view.c +++ b/src/lib-index/mail-index-transaction-view.c @@ -168,9 +168,13 @@ static void tview_lookup_first(struct mail_index_view *view, 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;