From: Timo Sirainen Date: Wed, 6 Nov 2024 12:16:26 +0000 (+0200) Subject: config: Remove config_export_get_*() wrapper functions X-Git-Tag: 2.4.1~571 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbe379e3fa95b329d181441698247e9416ee9e49;p=thirdparty%2Fdovecot%2Fcore.git config: Remove config_export_get_*() wrapper functions Use config_module_parsers_get_setting() directly. --- diff --git a/src/config/config-dump-full.c b/src/config/config-dump-full.c index e5005030de..b6c9fdba13 100644 --- a/src/config/config-dump-full.c +++ b/src/config/config-dump-full.c @@ -618,7 +618,10 @@ int config_dump_full(struct config_parsed *config, const char *final_path = NULL; switch (dest) { case CONFIG_DUMP_FULL_DEST_RUNDIR: { - const char *base_dir = config_export_get_base_dir(export_ctx); + const char *base_dir = + config_module_parsers_get_setting( + filter_parser->module_parsers, + "master_service", "base_dir"); final_path = t_strdup_printf("%s/dovecot.conf.binary", base_dir); str_append(path, final_path); str_append_c(path, '.'); @@ -653,8 +656,11 @@ int config_dump_full(struct config_parsed *config, o_stream_cork(output); if (import_environment_r != NULL) { - *import_environment_r = - t_strdup(config_export_get_import_environment(export_ctx)); + const char *value = + config_module_parsers_get_setting( + filter_parser->module_parsers, + "master_service", "import_environment"); + *import_environment_r = t_strdup(value); } uint64_t blob_size = UINT64_MAX; diff --git a/src/config/config-request.c b/src/config/config-request.c index 78c13bb1c7..0fe6ded4d7 100644 --- a/src/config/config-request.c +++ b/src/config/config-request.c @@ -394,19 +394,6 @@ unsigned int config_export_get_parser_count(struct config_export_context *ctx) return i; } -const char * -config_export_get_import_environment(struct config_export_context *ctx) -{ - return config_module_parsers_get_setting(ctx->module_parsers, - "master_service", "import_environment"); -} - -const char *config_export_get_base_dir(struct config_export_context *ctx) -{ - return config_module_parsers_get_setting(ctx->module_parsers, - "master_service", "base_dir"); -} - void config_export_free(struct config_export_context **_ctx) { struct config_export_context *ctx = *_ctx; diff --git a/src/config/config-request.h b/src/config/config-request.h index 29af027f1a..8d7c463fb0 100644 --- a/src/config/config-request.h +++ b/src/config/config-request.h @@ -63,9 +63,6 @@ config_export_init(enum config_dump_scope scope, void config_export_set_module_parsers(struct config_export_context *ctx, const struct config_module_parser *parsers); unsigned int config_export_get_parser_count(struct config_export_context *ctx); -const char * -config_export_get_import_environment(struct config_export_context *ctx); -const char *config_export_get_base_dir(struct config_export_context *ctx); int config_export_all_parsers(struct config_export_context **ctx); const struct setting_parser_info * config_export_parser_get_info(struct config_export_context *ctx,