]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Don't crash if shared namespace exists.
authorTimo Sirainen <tss@iki.fi>
Tue, 6 Apr 2010 23:08:28 +0000 (02:08 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 6 Apr 2010 23:08:28 +0000 (02:08 +0300)
--HG--
branch : HEAD

src/dsync/dsync-worker-local.c

index a298a9b43d0603052c5295a94b596e9123574e2f..29104727b55bf32a05a6b0d8df7a756d1f490427 100644 (file)
@@ -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;
                        }