dovecot: mail_index_transaction_get_next_uid(): If mail_index_re...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 18 08:20:47 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/dc93705c4038
changeset: 6068:dc93705c4038
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 18 07:56:02 2007 +0300
description:
mail_index_transaction_get_next_uid(): If mail_index_reset() was called,
don't use existing next_uid (and crash).

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-index/mail-index-transaction.c |    2 +-

diffs (12 lines):

diff -r f5d87227d12c -r dc93705c4038 src/lib-index/mail-index-transaction.c
--- a/src/lib-index/mail-index-transaction.c	Wed Jul 18 07:31:43 2007 +0300
+++ b/src/lib-index/mail-index-transaction.c	Wed Jul 18 07:56:02 2007 +0300
@@ -431,7 +431,7 @@ uint32_t mail_index_transaction_get_next
 	unsigned int count, offset;
 	uint32_t next_uid;
 
-	next_uid = t->view->map->hdr.next_uid;
+	next_uid = t->reset ? 1 : t->view->map->hdr.next_uid;
 	if (array_is_created(&t->appends)) {
 		/* get next_uid from appends if they have UIDs */
 		mail_index_transaction_sort_appends(t);


More information about the dovecot-cvs mailing list