Mercurial > dovecot > original-hg > dovecot-2.2
diff src/plugins/quota/quota-dict.c @ 17753:866bb1354e85
Replaced dict_init() with dict_init_full() in various places.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 28 Aug 2014 22:10:25 +0900 |
parents | add8c00fb3cc |
children |
line wrap: on
line diff
--- a/src/plugins/quota/quota-dict.c Thu Aug 28 21:57:34 2014 +0900 +++ b/src/plugins/quota/quota-dict.c Thu Aug 28 22:10:25 2014 +0900 @@ -32,6 +32,7 @@ const char **error_r) { struct dict_quota_root *root = (struct dict_quota_root *)_root; + struct dict_settings set; const char *username, *p, *error; p = args == NULL ? NULL : strchr(args, ':'); @@ -78,9 +79,12 @@ /* FIXME: we should use 64bit integer as datatype instead but before it can actually be used don't bother */ - if (dict_init(args, DICT_DATA_TYPE_STRING, username, - _root->quota->user->set->base_dir, &root->dict, - &error) < 0) { + memset(&set, 0, sizeof(set)); + set.username = username; + set.base_dir = _root->quota->user->set->base_dir; + if (mail_user_get_home(_root->quota->user, &set.home_dir) <= 0) + set.home_dir = NULL; + if (dict_init_full(args, &set, &root->dict, &error) < 0) { *error_r = t_strdup_printf("dict_init(%s) failed: %s", args, error); return -1; }