dovecot-2.2: dsync: Fixed using -n "" parameter

dovecot at dovecot.org dovecot at dovecot.org
Mon Apr 7 21:08:53 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/3e1a69e0cda9
changeset: 17200:3e1a69e0cda9
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 08 00:08:21 2014 +0300
description:
dsync: Fixed using -n "" parameter

diffstat:

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

diffs (16 lines):

diff -r 3b9935fe9cb7 -r 3e1a69e0cda9 src/doveadm/dsync/dsync-brain.c
--- a/src/doveadm/dsync/dsync-brain.c	Fri Apr 04 01:23:29 2014 +0300
+++ b/src/doveadm/dsync/dsync-brain.c	Tue Apr 08 00:08:21 2014 +0300
@@ -410,6 +410,12 @@
 	if (ibc_set->sync_ns_prefixes != NULL) {
 		p_array_init(&brain->sync_namespaces, brain->pool, 4);
 		prefixes = t_strsplit(ibc_set->sync_ns_prefixes, "\n");
+		if (prefixes[0] == NULL) {
+			/* ugly workaround for strsplit API: there was one
+			   prefix="" entry */
+			static const char *empty_prefix[] = { "", NULL };
+			prefixes = empty_prefix;
+		}
 		for (; *prefixes != NULL; prefixes++) {
 			ns = mail_namespace_find(brain->user->namespaces,
 						 *prefixes);


More information about the dovecot-cvs mailing list