dovecot: Fix for checking if new maildir files can be given UIDs...

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 10 23:05:54 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/a72d725ccb1b
changeset: 6766:a72d725ccb1b
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 10 23:05:51 2007 +0200
description:
Fix for checking if new maildir files can be given UIDs beginning from the
eexisting maildir UIDs.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-storage/index/dbox/dbox-sync-rebuild.c |    4 +++-

diffs (21 lines):

diff -r 5a189b41f6b0 -r a72d725ccb1b src/lib-storage/index/dbox/dbox-sync-rebuild.c
--- a/src/lib-storage/index/dbox/dbox-sync-rebuild.c	Sat Nov 10 23:05:07 2007 +0200
+++ b/src/lib-storage/index/dbox/dbox-sync-rebuild.c	Sat Nov 10 23:05:51 2007 +0200
@@ -321,7 +321,7 @@ static int dbox_sync_new_maildir(struct 
 
 	/* try to give them UIDs beginning from uidlist's next_uid */
 	next_uid = maildir_uidlist_get_next_uid(ctx->maildir_uidlist);
-	trans_view = mail_index_transaction_get_view(ctx->trans);
+	trans_view = mail_index_transaction_open_updated_view(ctx->trans);
 	for (i = 0; i < count; i++) {
 		if (mail_index_lookup_seq(trans_view, next_uid, &seq))
 			break;
@@ -333,6 +333,8 @@ static int dbox_sync_new_maildir(struct 
 		hdr = mail_index_get_header(trans_view);
 		ctx->maildir_new_uid = hdr->next_uid;
 	}
+	mail_index_view_close(&trans_view);
+
 	for (i = 0; i < count && ret == 0; i++) {
 		t_push();
 		ret = dbox_sync_index_maildir_file(ctx, fnames[i]);


More information about the dovecot-cvs mailing list