dovecot-2.2: dsync: Handle syncing mailboxes with same name but ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jan 10 09:33:29 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/f106740d92a0
changeset: 15627:f106740d92a0
user: Timo Sirainen <tss at iki.fi>
date: Thu Jan 10 09:33:19 2013 +0200
description:
dsync: Handle syncing mailboxes with same name but different GUIDs.
diffstat:
src/doveadm/dsync/dsync-mailbox-tree-sync.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (24 lines):
diff -r 1a47a0df6ad0 -r f106740d92a0 src/doveadm/dsync/dsync-mailbox-tree-sync.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c Thu Jan 10 08:07:19 2013 +0200
+++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c Thu Jan 10 09:33:19 2013 +0200
@@ -991,12 +991,15 @@
if (other_node == NULL)
other_node = sorted_tree_get(other_tree, name);
if (!dsync_mailbox_node_is_dir(other_node)) {
- /* already exists */
+ /* mailbox with same name exists both locally and
+ remotely, but they have different GUIDs and neither
+ side has the other's GUID. typically this means that
+ both sides had autocreated some mailboxes (e.g.
+ INBOX). we'll just change the GUID for one of
+ them. */
i_assert(node->existence == DSYNC_MAILBOX_NODE_EXISTS);
- // FIXME: remove this assert? for conflicting GUIDs
- /*i_assert(memcmp(node->mailbox_guid,
- other_node->mailbox_guid,
- sizeof(node->mailbox_guid)) == 0);*/
+ if (other_tree == ctx->local_tree)
+ sync_add_create_change(ctx, node, name);
} else {
other_node->existence = DSYNC_MAILBOX_NODE_EXISTS;
other_node->ns = node->ns;
More information about the dovecot-cvs
mailing list