dovecot-2.0: maildir: Another fix to handling saves/UID changes.

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 10 20:50:07 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/299b55312e1c
changeset: 9761:299b55312e1c
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 10 13:50:01 2009 -0400
description:
maildir: Another fix to handling saves/UID changes.

diffstat:

1 file changed, 3 insertions(+), 3 deletions(-)
src/lib-storage/index/maildir/maildir-save.c |    6 +++---

diffs (23 lines):

diff -r 815a76964e87 -r 299b55312e1c src/lib-storage/index/maildir/maildir-save.c
--- a/src/lib-storage/index/maildir/maildir-save.c	Mon Aug 10 13:49:31 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-save.c	Mon Aug 10 13:50:01 2009 -0400
@@ -712,16 +712,16 @@ maildir_save_set_recent_flags(struct mai
 	unsigned int i, count;
 	uint32_t uid;
 
-	uids = array_get(&saved_sorted_uids, &count);
+	count = array_count(&ctx->ctx.transaction->changes->saved_uids);
 	if (count == 0)
 		return 0;
 
-	t_array_init(&saved_sorted_uids,
-		     array_count(&ctx->ctx.transaction->changes->saved_uids));
+	t_array_init(&saved_sorted_uids, count);
 	array_append_array(&saved_sorted_uids,
 			   &ctx->ctx.transaction->changes->saved_uids);
 	array_sort(&saved_sorted_uids, seq_range_cmp);
 
+	uids = array_get(&saved_sorted_uids, &count);
 	for (i = 0; i < count; i++) {
 		for (uid = uids[i].seq1; uid <= uids[i].seq2; uid++)
 			index_mailbox_set_recent_uid(&mbox->ibox, uid);


More information about the dovecot-cvs mailing list