};
struct module *mail_storage_service_modules = NULL;
-static struct mail_storage_service_ctx *storage_service_global = NULL;
static int
mail_storage_service_var_expand(struct mail_storage_service_ctx *ctx,
if ((flags & MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT) == 0)
master_service_init_log_with_prefix(service, ctx->default_log_prefix);
dict_drivers_register_builtin();
- if (storage_service_global == NULL)
- storage_service_global = ctx;
return ctx;
}
if (ctx->set_cache != NULL)
master_service_settings_cache_deinit(&ctx->set_cache);
- if (storage_service_global == ctx)
- storage_service_global = NULL;
pool_unref(&ctx->pool);
module_dir_unload(&mail_storage_service_modules);
dict_drivers_unregister_builtin();
}
-struct mail_storage_service_ctx *mail_storage_service_get_global(void)
-{
- return storage_service_global;
-}
-
void *mail_storage_service_user_get_set(struct mail_storage_service_user *user,
const struct setting_parser_info *root)
{
int mail_storage_service_all_next(struct mail_storage_service_ctx *ctx,
const char **username_r);
void mail_storage_service_deinit(struct mail_storage_service_ctx **ctx);
-/* Returns the first created service context. If it gets freed, NULL is
- returned until the next time mail_storage_service_init() is called. */
-struct mail_storage_service_ctx *mail_storage_service_get_global(void);
/* Activate user context. Normally this is called automatically by the ioloop,
but e.g. during loops at deinit where all users are being destroyed, it's