}
int mail_namespace_alloc(struct mail_user *user,
- void *user_all_settings,
struct mail_namespace_settings *ns_set,
struct mail_namespace **ns_r,
const char **error_r)
ns->user = user;
ns->prefix = i_strdup(ns_set->prefix);
ns->set = ns_set;
- ns->user_set = user_all_settings;
ns->mail_set = settings_parser_get_root_set(user->set_parser,
&mail_storage_setting_parser_info);
i_array_init(&ns->all_storages, 2);
ns_set->list,
ns_set->subscriptions ? "yes" : "no", ns_set->location);
- if ((ret = mail_namespace_alloc(user, user->set,
- ns_set, &ns, error_r)) < 0)
+ if ((ret = mail_namespace_alloc(user, ns_set, &ns, error_r)) < 0)
return ret;
if (ns_set == &prefixless_ns_set) {
inbox_set->location, NULL);
}
- if ((ret = mail_namespace_alloc(user, user->set,
- inbox_set, &ns, error_r)) < 0)
+ if ((ret = mail_namespace_alloc(user, inbox_set, &ns, error_r)) < 0)
return ret;
if (mail_storage_create(ns, driver, 0, &error) < 0) {
ns->prefix = i_strdup("");
ns->flags = NAMESPACE_FLAG_INBOX_USER | NAMESPACE_FLAG_INBOX_ANY |
NAMESPACE_FLAG_LIST_PREFIX | NAMESPACE_FLAG_SUBSCRIPTIONS;
- ns->user_set = user->set;
ns->mail_set = mail_user_set_get_storage_set(user);
i_array_init(&ns->all_storages, 2);
return ns;
struct mail_storage *storage; /* default storage */
ARRAY(struct mail_storage *) all_storages;
- /* This may point to user->set, but it may also point to
- namespace-specific settings. When accessing namespace-specific
- settings it should be done through here instead of through the
- mail_user. */
- struct mail_user_settings *user_set;
-
const struct mail_namespace_settings *set;
const struct mail_storage_settings *mail_set;
/* Allocate a new namespace, and fill it based on the passed in settings.
This is the most low-level namespace creation function. The storage isn't
- initialized for the namespace.
-
- user_all_settings normally points to user->set. If you want to override
- settings for the created namespace, you can duplicate the user's settings
- and provide a pointer to it here. Note that the pointer must contain
- ALL the settings, including the dynamic driver-specific settings, so it
- needs to created via settings-parser API. */
+ initialized for the namespace. */
int mail_namespace_alloc(struct mail_user *user,
- void *user_all_settings,
struct mail_namespace_settings *ns_set,
struct mail_namespace **ns_r,
const char **error_r);