dovecot-2.2: dsync: Don't assert-crash in configs where INBOX do...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Feb 5 17:20:31 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/00a57ac1b9fa
changeset: 18219:00a57ac1b9fa
user: Timo Sirainen <tss at iki.fi>
date: Thu Feb 05 19:20:17 2015 +0200
description:
dsync: Don't assert-crash in configs where INBOX doesn't have a parent namespace.
The inbox=yes namespace of course exists, but if there is no prefix="" or
prefix=INBOX/ namespace, then INBOX doesn't clearly belong to any namespace.
diffstat:
src/doveadm/dsync/dsync-mailbox-tree-fill.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r 6a74968f7978 -r 00a57ac1b9fa src/doveadm/dsync/dsync-mailbox-tree-fill.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-fill.c Tue Feb 03 20:27:49 2015 +0200
+++ b/src/doveadm/dsync/dsync-mailbox-tree-fill.c Thu Feb 05 19:20:17 2015 +0200
@@ -20,9 +20,12 @@
struct dsync_mailbox_node *node;
node = dsync_mailbox_tree_get(tree, info->vname);
- if (node->ns != info->ns) {
- i_assert(node->ns != NULL);
-
+ if (node->ns == info->ns)
+ ;
+ else if (node->ns == NULL) {
+ i_assert(tree->root.ns == NULL);
+ node->ns = info->ns;
+ } else {
i_error("Mailbox '%s' exists in two namespaces: '%s' and '%s'",
info->vname, node->ns->prefix, info->ns->prefix);
return -1;
More information about the dovecot-cvs
mailing list