changeset 8915:676efa08f5d7 HEAD

shared mailboxes: Error logging improvement.
author Timo Sirainen <tss@iki.fi>
date Fri, 03 Apr 2009 17:54:56 -0400
parents a29215e13241
children 505f1b4cbd88
files src/lib-storage/index/shared/shared-storage.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 		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++) {
@@ -91,6 +90,10 @@
 		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;
 	MODULE_CONTEXT_SET_FULL(_storage->list, shared_mailbox_list_module,