]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: If unexpected changes happen during sync, return a safe last-common-uid for...
authorTimo Sirainen <tss@iki.fi>
Sat, 16 Feb 2013 14:45:47 +0000 (16:45 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 16 Feb 2013 14:45:47 +0000 (16:45 +0200)
src/doveadm/dsync/dsync-mailbox-import.c

index 125f8cc1eaff9cca2764399905bf7be4aa0cb607..16ebd1bdc971d234f3dd3c1b9ac36e0df7eab0b4 100644 (file)
@@ -1819,6 +1819,11 @@ reassign_unwanted_uids(struct dsync_mailbox_importer *importer,
                        *changes_during_sync_r = TRUE;
                }
        }
+       if (*changes_during_sync_r) {
+               /* conflicting changes during sync, revert our last-common-uid
+                  back to a safe value. */
+               importer->last_common_uid = importer->local_uid_next - 1;
+       }
        return ret;
 }