dovecot-1.2: shared mailboxes: Error logging improvement.

dovecot at dovecot.org dovecot at dovecot.org
Sat Apr 4 00:55:02 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/676efa08f5d7
changeset: 8915:676efa08f5d7
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 03 17:54:56 2009 -0400
description:
shared mailboxes: Error logging improvement.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/lib-storage/index/shared/shared-storage.c |    5 ++++-

diffs (22 lines):

diff -r a29215e13241 -r 676efa08f5d7 src/lib-storage/index/shared/shared-storage.c
--- a/src/lib-storage/index/shared/shared-storage.c	Fri Apr 03 17:31:08 2009 -0400
+++ b/src/lib-storage/index/shared/shared-storage.c	Fri Apr 03 17:54:56 2009 -0400
@@ -69,7 +69,6 @@ static int shared_create(struct mail_sto
 		return -1;
 	}
 	storage->ns_prefix_pattern = p_strdup(_storage->pool, wildcardp);
-	*wildcardp = '\0';
 
 	have_username = FALSE;
 	for (p = storage->ns_prefix_pattern; *p != '\0'; p++) {
@@ -90,6 +89,10 @@ static int shared_create(struct mail_sto
 		*error_r = "Shared namespace prefix doesn't contain %u or %n";
 		return -1;
 	}
+
+	/* truncate prefix after the above checks are done, so they can log
+	   the full prefix in error conditions */
+	*wildcardp = '\0';
 
 	if (mailbox_list_alloc("shared", &_storage->list, error_r) < 0)
 		return -1;


More information about the dovecot-cvs mailing list