Mercurial > dovecot > core-2.2
changeset 22306:8459df27194b
lib-storage: Another fix to mail storage initialization.
Allow mail_namespaces_init_location() to add the namespace directly to user,
since that's what the current callers always want. But compared to the
original code we're now calling mail_namespaces_init_finish() rather than
doing the same things ourself.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 03 May 2016 00:25:43 +0300 |
parents | 91b8f2b6ebcb |
children | 77aa19dcceee |
files | src/lib-storage/mail-namespace.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-namespace.c Mon May 02 17:00:22 2016 +0300 +++ b/src/lib-storage/mail-namespace.c Tue May 03 00:25:43 2016 +0300 @@ -438,8 +438,7 @@ if (namespaces == NULL) { /* no namespaces defined, create a default one */ - if (mail_namespaces_init_location(user, NULL, error_r) < 0) - return -1; + return mail_namespaces_init_location(user, NULL, error_r); } return mail_namespaces_init_finish(namespaces, error_r); } @@ -517,7 +516,7 @@ mail_namespace_free(ns); return -1; } - return 0; + return mail_namespaces_init_finish(ns, error_r); } struct mail_namespace *mail_namespaces_init_empty(struct mail_user *user)