From: Timo Sirainen Date: Fri, 9 Jul 2010 12:07:37 +0000 (+0100) Subject: dsync: Fixed creating mailboxes with remote dsync. X-Git-Tag: 2.0.rc2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17e74bc830c1c768aae6d175f3f099669df086a3;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fixed creating mailboxes with remote dsync. --HG-- branch : HEAD --- diff --git a/src/dsync/dsync-brain.c b/src/dsync/dsync-brain.c index 6d9d537f2a..710efd4e6e 100644 --- a/src/dsync/dsync-brain.c +++ b/src/dsync/dsync-brain.c @@ -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; diff --git a/src/dsync/dsync-proxy.c b/src/dsync/dsync-proxy.c index 30a3f01961..294edcfd67 100644 --- a/src/dsync/dsync-proxy.c +++ b/src/dsync/dsync-proxy.c @@ -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);