From: Timo Sirainen Date: Tue, 12 Nov 2024 20:39:53 +0000 (+0200) Subject: lib-storage: Add metacache_service_user_module X-Git-Tag: 2.4.0~272 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc580e07fbc0b44b90930d73b6310fb513790fa7;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Add metacache_service_user_module This is a bit of a kludge to keep it in core, but it is wanted independently by both obox and fts_dovecot plugins. --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index 2bf2356c45..779d9a3695 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -64,6 +64,9 @@ struct mail_storage_service_user_module_register mail_storage_service_user_module_register = { 0 }; struct module *mail_storage_service_modules = NULL; +struct metacache_service_user_module metacache_service_user_module = + MODULE_CONTEXT_INIT(&mail_storage_service_user_module_register); + static void set_keyvalue(struct mail_storage_service_user *user, const char *key, const char *value) { diff --git a/src/lib-storage/mail-storage-service.h b/src/lib-storage/mail-storage-service.h index 07f3b901d6..4bb5eab1ac 100644 --- a/src/lib-storage/mail-storage-service.h +++ b/src/lib-storage/mail-storage-service.h @@ -2,6 +2,7 @@ #define MAIL_STORAGE_SERVICE_H #include "net.h" +#include "module-context.h" struct master_service; struct ssl_iostream_settings; @@ -128,6 +129,11 @@ extern struct mail_storage_service_user_module_register mail_storage_service_user_module_register; extern struct module *mail_storage_service_modules; +/* Stored here, since it's used by both obox and fts_dovecot plugins. + It's better not to have to link fts_dovecot with obox plugin. */ +extern MODULE_CONTEXT_DEFINE(metacache_service_user_module, + &mail_storage_service_user_module_register); + struct mail_storage_service_ctx * mail_storage_service_init(struct master_service *service, enum mail_storage_service_flags flags);