From: Timo Sirainen Date: Mon, 7 Apr 2014 21:08:21 +0000 (+0300) Subject: dsync: Fixed using -n "" parameter X-Git-Tag: 2.2.13.rc1~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e569900bba2abb0fb8a5b6b6bee1b428c016db6c;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fixed using -n "" parameter --- diff --git a/src/doveadm/dsync/dsync-brain.c b/src/doveadm/dsync/dsync-brain.c index c061d0ebec..67acc861ef 100644 --- a/src/doveadm/dsync/dsync-brain.c +++ b/src/doveadm/dsync/dsync-brain.c @@ -410,6 +410,12 @@ static bool dsync_brain_slave_recv_handshake(struct dsync_brain *brain) 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);