From: Timo Sirainen Date: Tue, 6 Apr 2010 23:08:28 +0000 (+0300) Subject: dsync: Don't crash if shared namespace exists. X-Git-Tag: 2.0.beta5~185 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a501578d06f64ef50e056539401bf8439030472;p=thirdparty%2Fdovecot%2Fcore.git dsync: Don't crash if shared namespace exists. --HG-- branch : HEAD --- diff --git a/src/dsync/dsync-worker-local.c b/src/dsync/dsync-worker-local.c index a298a9b43d..29104727b5 100644 --- a/src/dsync/dsync-worker-local.c +++ b/src/dsync/dsync-worker-local.c @@ -149,7 +149,9 @@ static void dsync_drop_extra_namespaces(struct mail_user *user) continue; for (ns = user->namespaces; ns != NULL; ns = ns->next) { - if (strcmp(ns->prefix, ns_set[i]->prefix) == 0) { + /* compare settings pointers so that it'll work + for shared namespaces */ + if (ns->set == ns_set[i]) { mail_namespace_destroy(ns); break; }