dovecot-2.0: lib-storage: Allow shared namespace prefix to use %...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 26 19:07:59 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/b497a302e5cf
changeset: 11379:b497a302e5cf
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 26 17:07:53 2010 +0100
description:
lib-storage: Allow shared namespace prefix to use %variable modifiers.

diffstat:

 src/lib-storage/index/shared/shared-storage.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r 4eaebea097db -r b497a302e5cf src/lib-storage/index/shared/shared-storage.c
--- a/src/lib-storage/index/shared/shared-storage.c	Wed May 26 16:16:44 2010 +0100
+++ b/src/lib-storage/index/shared/shared-storage.c	Wed May 26 17:07:53 2010 +0100
@@ -31,7 +31,7 @@
 {
 	struct shared_storage *storage = (struct shared_storage *)_storage;
 	const char *driver, *p;
-	char *wildcardp;
+	char *wildcardp, key;
 	bool have_username;
 
 	/* location must begin with the actual mailbox driver */
@@ -61,11 +61,11 @@
 	for (p = storage->ns_prefix_pattern; *p != '\0'; p++) {
 		if (*p != '%')
 			continue;
-		if (*++p == '\0')
-			break;
-		if (*p == 'u' || *p == 'n')
+
+		key = var_get_key(p + 1);
+		if (key == 'u' || key == 'n')
 			have_username = TRUE;
-		else if (*p != '%' && *p != 'd')
+		else if (key != '%' && key != 'd')
 			break;
 	}
 	if (*p != '\0') {


More information about the dovecot-cvs mailing list