Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-index/mail-index-transaction-view.c @ 5228:3bccf203fa91 HEAD
When adding mails to index in non-sorted UID order and then using
mail_index_get_header(), the next_uid field could have been wrong.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 06 Mar 2007 22:19:08 +0200 |
parents | 0ffb6fa11744 |
children | fd6ff4d9cab1 |
line wrap: on
line diff
--- a/src/lib-index/mail-index-transaction-view.c Tue Mar 06 22:06:23 2007 +0200 +++ b/src/lib-index/mail-index-transaction-view.c Tue Mar 06 22:19:08 2007 +0200 @@ -50,6 +50,8 @@ if (array_is_created(&tview->t->appends)) { /* update next_uid from appends, if UIDs have been given yet */ + mail_index_transaction_sort_appends(tview->t); + recs = array_get(&tview->t->appends, &count); if (count > 0 && recs[count-1].uid != 0) { i_assert(recs[count-1].uid >= hdr->next_uid);