dovecot-2.2: dsync: Minor fixes to checking if namespace is want...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 17 14:40:10 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/014003da870e
changeset: 16527:014003da870e
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 17 14:39:59 2013 +0300
description:
dsync: Minor fixes to checking if namespace is wanted to be synced.

diffstat:

 src/doveadm/dsync/dsync-brain-mailbox-tree.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (30 lines):

diff -r 178fe5bf943b -r 014003da870e src/doveadm/dsync/dsync-brain-mailbox-tree.c
--- a/src/doveadm/dsync/dsync-brain-mailbox-tree.c	Mon Jun 17 00:03:16 2013 +0300
+++ b/src/doveadm/dsync/dsync-brain-mailbox-tree.c	Mon Jun 17 14:39:59 2013 +0300
@@ -14,8 +14,8 @@
 static bool dsync_brain_want_namespace(struct dsync_brain *brain,
 				       struct mail_namespace *ns)
 {
-	if (brain->sync_ns == ns)
-		return TRUE;
+	if (brain->sync_ns != NULL)
+		return brain->sync_ns == ns;
 	if (ns->alias_for != NULL) {
 		/* always skip aliases */
 		return FALSE;
@@ -26,11 +26,11 @@
 		if ((ns->flags & (NAMESPACE_FLAG_LIST_PREFIX |
 				  NAMESPACE_FLAG_LIST_CHILDREN)) != 0)
 			return TRUE;
+		return FALSE;
+	} else {
+		return strcmp(ns->unexpanded_set->location,
+			      SETTING_STRVAR_UNEXPANDED) == 0;
 	}
-
-	return brain->sync_ns == NULL &&
-		strcmp(ns->unexpanded_set->location,
-		       SETTING_STRVAR_UNEXPANDED) == 0;
 }
 
 static void dsync_brain_check_namespaces(struct dsync_brain *brain)


More information about the dovecot-cvs mailing list