dovecot-2.2: lib-storage: Still more fixing to listing subscript...

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 25 20:20:29 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/ef7eb84d9a3a
changeset: 15964:ef7eb84d9a3a
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 25 20:20:18 2013 +0200
description:
lib-storage: Still more fixing to listing subscriptions.

diffstat:

 src/lib-storage/list/mailbox-list-subscriptions.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r c8fc02c88cf6 -r ef7eb84d9a3a src/lib-storage/list/mailbox-list-subscriptions.c
--- a/src/lib-storage/list/mailbox-list-subscriptions.c	Mon Feb 25 20:09:52 2013 +0200
+++ b/src/lib-storage/list/mailbox-list-subscriptions.c	Mon Feb 25 20:20:18 2013 +0200
@@ -45,10 +45,11 @@
 	}
 	ns = mail_namespace_find_unsubscribable(namespaces, ns_name);
 	if (ns != NULL && ns != default_ns) {
-		if (ns->prefix_len > default_ns->prefix_len ||
-		    strncmp(ns->prefix, default_ns->prefix, ns->prefix_len) != 0)
+		if (ns->prefix_len > 0)
 			return 0;
-		ns = default_ns;
+		/* prefix="" namespace=no : catching this is basically the
+		   same as not finding any namespace. */
+		ns = NULL;
 	}
 
 	/* 2) when listing pub/ namespace, skip over entries that don't


More information about the dovecot-cvs mailing list