dovecot-2.2: dsync: Added extra asserts
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 4 18:22:57 EET 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/e5e7579e30f0
changeset: 17126:e5e7579e30f0
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 03 11:50:10 2014 -0500
description:
dsync: Added extra asserts
diffstat:
src/doveadm/dsync/dsync-mailbox-tree-sync.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (45 lines):
diff -r e1db4af9e2c1 -r e5e7579e30f0 src/doveadm/dsync/dsync-mailbox-tree-sync.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c Mon Feb 03 11:38:40 2014 -0500
+++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c Mon Feb 03 11:50:10 2014 -0500
@@ -88,6 +88,8 @@
struct dsync_mailbox_tree_sync_change *change;
const char *name;
+ i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL);
+
name = dsync_mailbox_node_get_full_name(ctx->local_tree, node);
change = array_append_space(&ctx->changes);
@@ -102,6 +104,8 @@
{
struct dsync_mailbox_tree_sync_change *change;
+ i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL);
+
change = array_append_space(&ctx->changes);
change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_CREATE_BOX;
change->ns = node->ns;
@@ -162,6 +166,7 @@
if (tree == ctx->local_tree) {
/* delete this mailbox locally */
+ i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL);
change = array_append_space(&ctx->changes);
change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_DELETE_BOX;
change->ns = node->ns;
@@ -393,6 +398,7 @@
/* we're modifying a local tree. remember this change. */
new_name = dsync_mailbox_node_get_full_name(tree, node);
+ i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL);
i_assert(strcmp(old_name, "INBOX") != 0);
change = array_append_space(&ctx->changes);
change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_RENAME;
@@ -460,6 +466,7 @@
/* we're modifying a local tree. remember this change. */
other_name = dsync_mailbox_node_get_full_name(other_tree, other_node);
+ i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL);
i_assert(strcmp(name, "INBOX") != 0);
change = array_append_space(&ctx->changes);
change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_RENAME;
More information about the dovecot-cvs
mailing list