dovecot: Fixed reassigning new UIDs to more than one message.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jul 16 01:23:21 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/68be663e79ec
changeset: 6028:68be663e79ec
user: Timo Sirainen <tss at iki.fi>
date: Mon Jul 16 01:22:49 2007 +0300
description:
Fixed reassigning new UIDs to more than one message.
diffstat:
3 files changed, 9 insertions(+), 4 deletions(-)
src/lib-storage/index/maildir/maildir-sync-index.c | 3 ++-
src/lib-storage/index/maildir/maildir-uidlist.c | 7 +++++--
src/lib-storage/index/maildir/maildir-uidlist.h | 3 ++-
diffs (45 lines):
diff -r 3b260c6d9207 -r 68be663e79ec src/lib-storage/index/maildir/maildir-sync-index.c
--- a/src/lib-storage/index/maildir/maildir-sync-index.c Mon Jul 16 01:21:44 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-sync-index.c Mon Jul 16 01:22:49 2007 +0300
@@ -127,7 +127,8 @@ static void maildir_handle_uid_insertion
if (ctx->uidlist_sync_ctx == NULL) {
ret = maildir_uidlist_sync_init(ctx->mbox->uidlist,
- MAILDIR_UIDLIST_SYNC_PARTIAL,
+ MAILDIR_UIDLIST_SYNC_PARTIAL |
+ MAILDIR_UIDLIST_SYNC_KEEP_STATE,
&ctx->uidlist_sync_ctx);
i_assert(ret > 0);
}
diff -r 3b260c6d9207 -r 68be663e79ec src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c Mon Jul 16 01:21:44 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c Mon Jul 16 01:22:49 2007 +0300
@@ -1030,10 +1030,13 @@ int maildir_uidlist_sync_init(struct mai
ctx->uidlist = uidlist;
ctx->sync_flags = sync_flags;
ctx->partial = (sync_flags & MAILDIR_UIDLIST_SYNC_PARTIAL) != 0;
+ ctx->first_new_pos = (unsigned int)-1;
if (ctx->partial) {
- /* initially mark all nonsynced */
- maildir_uidlist_mark_all(uidlist, TRUE);
+ if ((sync_flags & MAILDIR_UIDLIST_SYNC_KEEP_STATE) == 0) {
+ /* initially mark all nonsynced */
+ maildir_uidlist_mark_all(uidlist, TRUE);
+ }
return 1;
}
diff -r 3b260c6d9207 -r 68be663e79ec src/lib-storage/index/maildir/maildir-uidlist.h
--- a/src/lib-storage/index/maildir/maildir-uidlist.h Mon Jul 16 01:21:44 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.h Mon Jul 16 01:22:49 2007 +0300
@@ -6,7 +6,8 @@ struct maildir_uidlist_sync_ctx;
struct maildir_uidlist_sync_ctx;
enum maildir_uidlist_sync_flags {
- MAILDIR_UIDLIST_SYNC_PARTIAL = 0x01
+ MAILDIR_UIDLIST_SYNC_PARTIAL = 0x01,
+ MAILDIR_UIDLIST_SYNC_KEEP_STATE = 0x02
};
enum maildir_uidlist_rec_flag {
More information about the dovecot-cvs
mailing list