From: Timo Sirainen Date: Wed, 23 Jun 2004 06:09:00 +0000 (+0300) Subject: partial syncing fixes X-Git-Tag: 1.1.alpha1~3878 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a33fde36c57839342dafdf3c8d4b5c009e3ef4bc;p=thirdparty%2Fdovecot%2Fcore.git partial syncing fixes --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/maildir/maildir-sync.c b/src/lib-storage/index/maildir/maildir-sync.c index 353bbd100f..7bbc501334 100644 --- a/src/lib-storage/index/maildir/maildir-sync.c +++ b/src/lib-storage/index/maildir/maildir-sync.c @@ -642,10 +642,6 @@ static int maildir_sync_index(struct maildir_sync_context *ctx) __again: seq++; - if ((uflags & MAILDIR_UIDLIST_REC_FLAG_NONSYNCED) != 0) { - /* partial syncing */ - continue; - } if (seq > hdr->messages_count) { if (uid < hdr->next_uid) { @@ -658,6 +654,11 @@ static int maildir_sync_index(struct maildir_sync_context *ctx) the difference between this and the later check is that this one happens when messages are expunged from the end */ + if ((uflags & + MAILDIR_UIDLIST_REC_FLAG_NONSYNCED) != 0) { + /* partial syncing */ + continue; + } if ((uflags & MAILDIR_UIDLIST_REC_FLAG_RACING) != 0) { mail_storage_set_critical( @@ -703,6 +704,12 @@ static int maildir_sync_index(struct maildir_sync_context *ctx) committed changes to index. so, this message shouldn't actually exist. mark it racy and check in next sync. */ + if ((uflags & + MAILDIR_UIDLIST_REC_FLAG_NONSYNCED) != 0) { + /* partial syncing */ + seq--; + continue; + } if ((uflags & MAILDIR_UIDLIST_REC_FLAG_RACING) != 0) { mail_storage_set_critical(ibox->box.storage, "Maildir %s sync: UID inserted in the " @@ -722,6 +729,11 @@ static int maildir_sync_index(struct maildir_sync_context *ctx) continue; } + if ((uflags & MAILDIR_UIDLIST_REC_FLAG_NONSYNCED) != 0) { + /* partial syncing */ + continue; + } + if ((rec->flags & MAIL_INDEX_MAIL_FLAG_DIRTY) != 0) { /* we haven't been able to update maildir with this record's flag changes. don't sync them. */