Lines Matching defs:new_ns
140 struct mail_namespace *new_ns, *ns = *_ns;
290 new_ns = i_new(struct mail_namespace, 1);
291 new_ns->refcount = 1;
292 new_ns->type = MAIL_NAMESPACE_TYPE_SHARED;
293 new_ns->user = user;
294 new_ns->prefix = i_strdup(str_c(prefix));
295 new_ns->owner = owner;
296 new_ns->flags = (NAMESPACE_FLAG_SUBSCRIPTIONS & ns->flags) |
299 new_ns->user_set = user->set;
300 new_ns->mail_set = _storage->set;
301 i_array_init(&new_ns->all_storages, 2);
305 new_ns->flags |= NAMESPACE_FLAG_UNUSABLE;
315 ns_set->prefix = new_ns->prefix;
319 new_ns->set = ns_set;
326 new_ns->unexpanded_set = unexpanded_ns_set;
331 mail_namespace_destroy(new_ns);
335 if (mail_storage_create(new_ns, NULL, _storage->flags |
338 new_ns->prefix, error);
340 mail_namespace_destroy(new_ns);
343 if ((new_ns->flags & NAMESPACE_FLAG_UNUSABLE) == 0 &&
344 !shared_namespace_exists(new_ns)) {
346 new_ns->flags |= NAMESPACE_FLAG_UNUSABLE;
351 *_name = mailbox_list_get_storage_name(new_ns->list,
352 t_strconcat(new_ns->prefix, name, NULL));
353 *_ns = new_ns;
357 mail_namespace_get_default_storage(new_ns)->class_flags;
360 mail_user_add_namespace(user, &new_ns);