]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Remove unused mail_storage_service_get_global()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 12 Jan 2023 16:25:23 +0000 (18:25 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 27 Jan 2023 11:08:35 +0000 (11:08 +0000)
src/lib-storage/mail-storage-service.c
src/lib-storage/mail-storage-service.h

index d366439c23d4cd78a1459d3a99ea7d4a21b8931e..f55304769b44822b0fb0421dc55562391ad7e6ca 100644 (file)
@@ -97,7 +97,6 @@ struct mail_storage_service_user {
 };
 
 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,
@@ -1007,8 +1006,6 @@ mail_storage_service_init(struct master_service *service,
        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;
 }
 
@@ -1769,8 +1766,6 @@ void mail_storage_service_deinit(struct mail_storage_service_ctx **_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);
@@ -1778,11 +1773,6 @@ void mail_storage_service_deinit(struct mail_storage_service_ctx **_ctx)
        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)
 {
index d7aae7b0b1cf0c37b0cc69e7749dc9f8462f2e06..8474d3b16f1ae9acb09c28e7922b831b38d949fe 100644 (file)
@@ -145,9 +145,6 @@ void mail_storage_service_all_init_mask(struct mail_storage_service_ctx *ctx,
 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