From: Timo Sirainen Date: Tue, 29 Nov 2022 16:58:57 +0000 (+0200) Subject: login-common: Remove master-service-settings-cache usage X-Git-Tag: 2.4.0~3087 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e32d3b93ca1fb62aa874fdc3e2199b2a04f9ba2f;p=thirdparty%2Fdovecot%2Fcore.git login-common: Remove master-service-settings-cache usage --- diff --git a/src/login-common/login-settings.c b/src/login-common/login-settings.c index 64de67f085..a4ad808c08 100644 --- a/src/login-common/login-settings.c +++ b/src/login-common/login-settings.c @@ -7,7 +7,6 @@ #include "master-service.h" #include "master-service-settings.h" #include "master-service-ssl-settings.h" -#include "master-service-settings-cache.h" #include "login-settings.h" #include @@ -97,8 +96,6 @@ static const struct setting_parser_info *default_login_set_roots[] = { const struct setting_parser_info **login_set_roots = default_login_set_roots; -static struct master_service_settings_cache *set_cache; - /* */ static bool login_settings_check(void *_set, pool_t pool, const char **error_r) @@ -168,6 +165,7 @@ login_settings_read(pool_t pool, void ***other_settings_r) { struct master_service_settings_input input; + struct master_service_settings_output output; const char *error; struct setting_parser_context *parser; void **sets; @@ -184,23 +182,10 @@ login_settings_read(pool_t pool, if (remote_ip != NULL) input.remote_ip = *remote_ip; - if (set_cache == NULL) { - set_cache = master_service_settings_cache_init(master_service, - input.module, - input.service); - /* lookup filters - - this is only enabled if service_count > 1 because otherwise - login process will process only one request and this is only - useful when more than one request is processed. - */ - if (master_service_get_service_count(master_service) > 1) - master_service_settings_cache_init_filter(set_cache); - } - - if (master_service_settings_cache_read(set_cache, &input, - &parser, &error) < 0) + if (master_service_settings_read(master_service, &input, + &output, &error) < 0) i_fatal("Error reading configuration: %s", error); + parser = master_service_get_settings_parser(master_service); for (count = 0; input.roots[count] != NULL; count++) ; sets = p_new(pool, void *, count + 1); @@ -220,9 +205,3 @@ login_settings_read(pool_t pool, *other_settings_r = sets + 1; return sets[0]; } - -void login_settings_deinit(void) -{ - if (set_cache != NULL) - master_service_settings_cache_deinit(&set_cache); -} diff --git a/src/login-common/login-settings.h b/src/login-common/login-settings.h index 66711411b2..8b93cb5092 100644 --- a/src/login-common/login-settings.h +++ b/src/login-common/login-settings.h @@ -46,6 +46,5 @@ login_settings_read(pool_t pool, const struct master_service_ssl_settings **ssl_set_r, const struct master_service_ssl_server_settings **ssl_server_set_r, void ***other_settings_r) ATTR_NULL(2, 3, 4); -void login_settings_deinit(void); #endif diff --git a/src/login-common/main.c b/src/login-common/main.c index 7dd2f7bfc6..baf00c33a0 100644 --- a/src/login-common/main.c +++ b/src/login-common/main.c @@ -455,7 +455,6 @@ static void main_deinit(void) timeout_remove(&auth_client_to); client_common_deinit(); dsasl_clients_deinit(); - login_settings_deinit(); } int login_binary_run(struct login_binary *binary,