]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fixed unsubscribing from mailbox within same session as the mailbox's deletion.
authorTimo Sirainen <tss@iki.fi>
Wed, 22 May 2013 12:16:22 +0000 (15:16 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 22 May 2013 12:16:22 +0000 (15:16 +0300)
src/doveadm/dsync/dsync-brain-mailbox-tree.c

index 63540386fa178449dde48a5f3a4492412e7bec8d..fb13444eba112ba0f31616a80e76f9404a44ecc7 100644 (file)
@@ -395,8 +395,8 @@ dsync_brain_mailbox_tree_add_delete(struct dsync_mailbox_tree *tree,
        name = dsync_mailbox_node_get_full_name(tree, node);
        other_node = dsync_mailbox_tree_get(other_tree, name);
 
-       if (!guid_128_is_empty(other_node->mailbox_guid) ||
-           (other_node->existence == DSYNC_MAILBOX_NODE_EXISTS &&
+       if (other_node->existence == DSYNC_MAILBOX_NODE_EXISTS &&
+           (!guid_128_is_empty(other_node->mailbox_guid) ||
             other_del->type != DSYNC_MAILBOX_DELETE_TYPE_MAILBOX)) {
                /* other side has already created a new mailbox or
                   directory with this name, we can't delete it */