dovecot-2.0: lib-storage: Set mail_namespace.unexpanded_set also...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 8 22:32:58 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/9f546fe13fc5
changeset: 11499:9f546fe13fc5
user: Timo Sirainen <tss at iki.fi>
date: Tue Jun 08 20:32:23 2010 +0100
description:
lib-storage: Set mail_namespace.unexpanded_set also when no namespaces are defined.
diffstat:
src/lib-storage/mail-namespace.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (48 lines):
diff -r 190a5278e58b -r 9f546fe13fc5 src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c Tue Jun 08 19:34:14 2010 +0100
+++ b/src/lib-storage/mail-namespace.c Tue Jun 08 20:32:23 2010 +0100
@@ -253,11 +253,11 @@
int mail_namespaces_init(struct mail_user *user, const char **error_r)
{
- const struct mail_storage_settings *mail_set;
+ const struct mail_storage_settings *mail_set, *unexpanded_mail_set;
struct mail_namespace_settings *const *ns_set;
struct mail_namespace_settings *const *unexpanded_ns_set;
struct mail_namespace *namespaces, *ns, **ns_p;
- struct mail_namespace_settings *inbox_set;
+ struct mail_namespace_settings *inbox_set, *unexpanded_inbox_set;
const char *error, *driver, *location_source;
unsigned int i, count, count2;
@@ -310,9 +310,18 @@
*inbox_set = mail_namespace_default_settings;
inbox_set->inbox = TRUE;
+ unexpanded_inbox_set = p_new(user->pool, struct mail_namespace_settings, 1);
+ *unexpanded_inbox_set = *inbox_set;
+
driver = NULL;
if (*mail_set->mail_location != '\0') {
+ unexpanded_mail_set = mail_user_set_get_driver_settings(
+ user->set_info, user->unexpanded_set,
+ MAIL_STORAGE_SET_DRIVER_NAME);
+
inbox_set->location = mail_set->mail_location;
+ unexpanded_inbox_set->location =
+ unexpanded_mail_set->mail_location;
location_source = "mail_location setting";
} else {
location_source = "environment MAIL";
@@ -329,7 +338,11 @@
}
}
+ if (unexpanded_inbox_set->location == NULL)
+ unexpanded_inbox_set->location = inbox_set->location;
+
ns->set = inbox_set;
+ ns->unexpanded_set = unexpanded_inbox_set;
ns->mail_set = mail_set;
ns->prefix = i_strdup(ns->set->prefix);
ns->user = user;
More information about the dovecot-cvs
mailing list