dovecot-2.2: dsync: Don't assert-crash if we have the same mailb...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Apr 3 15:21:57 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/8328d67e2329
changeset: 17186:8328d67e2329
user: Timo Sirainen <tss at iki.fi>
date: Thu Apr 03 18:21:39 2014 +0300
description:
dsync: Don't assert-crash if we have the same mailbox name in conflicting namespaces.
diffstat:
src/doveadm/dsync/dsync-brain-mailbox-tree.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (19 lines):
diff -r 9b50caaa4467 -r 8328d67e2329 src/doveadm/dsync/dsync-brain-mailbox-tree.c
--- a/src/doveadm/dsync/dsync-brain-mailbox-tree.c Thu Apr 03 14:41:25 2014 +0300
+++ b/src/doveadm/dsync/dsync-brain-mailbox-tree.c Thu Apr 03 18:21:39 2014 +0300
@@ -387,7 +387,14 @@
memcpy(other_node->mailbox_guid, node->mailbox_guid,
sizeof(other_node->mailbox_guid));
}
- i_assert(other_node->ns == NULL || other_node->ns == node->ns);
+ if (other_node->ns != node->ns && other_node->ns != NULL) {
+ /* namespace mismatch for this node. this shouldn't happen
+ normally, but especially during some misconfigurations it's
+ possible that one side has created mailboxes that conflict
+ with another namespace's prefix. since we're here because
+ one of the mailboxes was deleted, we'll just ignore this. */
+ return;
+ }
other_node->ns = node->ns;
if (other_del->type != DSYNC_MAILBOX_DELETE_TYPE_UNSUBSCRIBE)
other_node->existence = DSYNC_MAILBOX_NODE_DELETED;
More information about the dovecot-cvs
mailing list