From c80283bc36260e44f2431f779b4f1c7fed473b9f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 12 Nov 2024 22:39:53 +0200 Subject: [PATCH] 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. --- src/lib-storage/mail-storage-service.c | 3 +++ src/lib-storage/mail-storage-service.h | 6 ++++++ 2 files changed, 9 insertions(+) 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); -- 2.47.3