]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fixed creating mailboxes with remote dsync.
authorTimo Sirainen <tss@iki.fi>
Fri, 9 Jul 2010 12:07:37 +0000 (13:07 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 9 Jul 2010 12:07:37 +0000 (13:07 +0100)
--HG--
branch : HEAD

src/dsync/dsync-brain.c
src/dsync/dsync-proxy.c

index 6d9d537f2ab2e8d80e09ddc68bc8e460c707d9ae..710efd4e6edf9c62561107c88efd77b4e2358b73 100644 (file)
@@ -287,7 +287,7 @@ dsync_brain_mailbox_action(struct dsync_brain *brain,
                break;
        case DSYNC_BRAIN_MAILBOX_ACTION_CREATE:
                new_box = *action_box;
-               new_box.uid_next = 0;
+               new_box.uid_next = action_box->uid_validity == 0 ? 0 : 1;
                new_box.highest_modseq = 0;
                dsync_worker_create_mailbox(action_worker, &new_box);
                break;
index 30a3f0196100bde7714126382c1df2f6db000ad2..294edcfd6764c6ced345a1188d3dfb98f5978a0c 100644 (file)
@@ -170,6 +170,7 @@ void dsync_proxy_mailbox_export(string_t *str,
        }
        i_assert(box->uid_validity != 0 ||
                 (box->flags & DSYNC_MAILBOX_FLAG_DELETED_MAILBOX) != 0);
+       i_assert(box->uid_validity == 0 || box->uid_next != 0);
 
        str_append_c(str, '\t');
        dsync_proxy_mailbox_guid_export(str, &box->mailbox_guid);