From: Timo Sirainen Date: Sun, 18 Dec 2022 22:05:52 +0000 (+0200) Subject: config: config_filter_parsers_get() - Remove unused modules parameter X-Git-Tag: 2.4.0~3072 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d40ecfcca057db6d35365559a035da056052f07;p=thirdparty%2Fdovecot%2Fcore.git config: config_filter_parsers_get() - Remove unused modules parameter --- diff --git a/src/config/config-filter.c b/src/config/config-filter.c index edbd0459f3..193347bfe1 100644 --- a/src/config/config-filter.c +++ b/src/config/config-filter.c @@ -185,17 +185,12 @@ static bool str_array_contains(ARRAY_TYPE(const_string) *arr, const char *str) return FALSE; } -static bool have_changed_settings(const struct config_filter_parser *parser, - const char *const *modules) +static bool have_changed_settings(const struct config_filter_parser *parser) { const unsigned char *changes; unsigned int i, j, size; for (i = 0; parser->parsers[i].root != NULL; i++) { - if (!config_module_want_parser(config_module_parsers, - modules, parser->parsers[i].root)) - continue; - changes = settings_parser_get_changes(parser->parsers[i].parser); size = parser->parsers[i].root->struct_size; for (j = 0; j < size; j++) { @@ -208,7 +203,6 @@ static bool have_changed_settings(const struct config_filter_parser *parser, static struct config_filter_parser *const * config_filter_find_all(struct config_filter_context *ctx, pool_t pool, - const char *const *modules, const struct config_filter *filter, struct master_service_settings_output *output_r) { @@ -225,7 +219,7 @@ config_filter_find_all(struct config_filter_context *ctx, pool_t pool, if (!config_filter_match_service(mask, filter)) { if (!str_array_contains(&service_names, mask->service) && - have_changed_settings(ctx->parsers[i], modules)) + have_changed_settings(ctx->parsers[i])) array_push_back(&service_names, &mask->service); continue; @@ -320,7 +314,6 @@ config_module_parser_apply_changes(struct config_module_parser *dest, } int config_filter_parsers_get(struct config_filter_context *ctx, pool_t pool, - const char *const *modules, const struct config_filter *filter, struct config_module_parser **parsers_r, struct master_service_settings_output *output_r, @@ -336,7 +329,7 @@ int config_filter_parsers_get(struct config_filter_context *ctx, pool_t pool, with an error. Merging SET_STRLIST types requires settings_parser_apply_changes() to work a bit unintuitively by letting the destination settings override the source settings. */ - src = config_filter_find_all(ctx, pool, modules, filter, output_r); + src = config_filter_find_all(ctx, pool, filter, output_r); /* all of them should have the same number of parsers. duplicate our initial parsers from the first match */ diff --git a/src/config/config-filter.h b/src/config/config-filter.h index 7e45fc1a77..a9dfd8ed1b 100644 --- a/src/config/config-filter.h +++ b/src/config/config-filter.h @@ -33,7 +33,6 @@ void config_filter_add_all(struct config_filter_context *ctx, /* Build new parsers from all existing ones matching the given filter. */ int config_filter_parsers_get(struct config_filter_context *ctx, pool_t pool, - const char *const *modules, const struct config_filter *filter, struct config_module_parser **parsers_r, struct master_service_settings_output *output_r, diff --git a/src/config/config-parser.c b/src/config/config-parser.c index a81a98b9de..099b577a40 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -433,7 +433,7 @@ config_all_parsers_check(struct config_parser_context *ctx, global_ssl_set = get_str_setting(parsers[0], "ssl", ""); for (i = 0; i < count && ret == 0; i++) { - if (config_filter_parsers_get(new_filter, tmp_pool, NULL, + if (config_filter_parsers_get(new_filter, tmp_pool, &parsers[i]->filter, &tmp_parsers, &output, error_r) < 0) { diff --git a/src/config/config-request.c b/src/config/config-request.c index edb089c9fa..9e1019dd18 100644 --- a/src/config/config-request.c +++ b/src/config/config-request.c @@ -403,8 +403,7 @@ void config_export_by_filter(struct config_export_context *ctx, { const char *error; - if (config_filter_parsers_get(config_filter, ctx->pool, - NULL, filter, + if (config_filter_parsers_get(config_filter, ctx->pool, filter, &ctx->dup_parsers, &ctx->output, &error) < 0) { i_error("%s", error);