Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8214:76425554b4bc HEAD
Transaction view: If index is reset, don't return old to-be-removed sequences.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 22 Sep 2008 23:49:33 +0300 |
parents | ffefb9074966 |
children | c0888db40086 |
files | src/lib-index/mail-index-transaction-view.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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;