]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Transaction view: If index is reset, lookup_first() shouldn't return old sequences.
authorTimo Sirainen <tss@iki.fi>
Mon, 22 Sep 2008 20:50:38 +0000 (23:50 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 22 Sep 2008 20:50:38 +0000 (23:50 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-transaction-view.c

index 3f1acc53adc71792294dc976204b4ed28304905d..d2abe99e4f2eb1ccd5e9a8fb3081354ae4818e11 100644 (file)
@@ -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;