]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: config_export_init() - Remove unused exclude_settings parameter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 18 Dec 2022 22:08:47 +0000 (00:08 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 27 Jan 2023 13:01:47 +0000 (13:01 +0000)
src/config/config-dump-full.c
src/config/config-request.c
src/config/config-request.h
src/config/doveconf.c

index afda098c369ced60d779030eb026639c7697dd0c..84ba2a7655375777d59885879dfce54c1c88e336 100644 (file)
@@ -91,7 +91,7 @@ config_dump_full_sections(struct ostream *output, unsigned int section_idx)
 
        for (; *filters != NULL && ret == 0; filters++) T_BEGIN {
                config_dump_full_write_filter(output, &(*filters)->filter);
-               export_ctx = config_export_init(NULL, NULL,
+               export_ctx = config_export_init(NULL,
                        CONFIG_DUMP_SCOPE_SET,
                        CONFIG_DUMP_FLAG_HIDE_LIST_DEFAULTS,
                        config_dump_full_callback, &dump_ctx);
@@ -118,7 +118,7 @@ int config_dump_full(struct ostream *output, const char **import_environment_r)
        };
 
        flags = CONFIG_DUMP_FLAG_CHECK_SETTINGS;
-       export_ctx = config_export_init(NULL, NULL,
+       export_ctx = config_export_init(NULL,
                                        CONFIG_DUMP_SCOPE_CHANGED, flags,
                                        config_dump_full_callback, &dump_ctx);
        i_zero(&empty_filter);
index 28ffacd6beac8cf4a8bbf5779626228c7aa7008f..a8a99e2de5b6d2cf3e4e4802203d3f35ee60592b 100644 (file)
@@ -23,7 +23,6 @@ struct config_export_context {
        void *context;
 
        const char *const *modules;
-       const char *const *exclude_settings;
        enum config_dump_flags flags;
        const struct config_module_parser *parsers;
        struct config_module_parser *dup_parsers;
@@ -229,10 +228,6 @@ settings_export(struct config_export_context *ctx,
        bool dump, dump_default = FALSE;
 
        for (def = info->defines; def->key != NULL; def++) {
-               if (ctx->exclude_settings != NULL &&
-                   str_array_find(ctx->exclude_settings, def->key))
-                       continue;
-
                value = CONST_PTR_OFFSET(set, def->offset);
                default_value = info->defaults == NULL ? NULL :
                        CONST_PTR_OFFSET(info->defaults, def->offset);
@@ -384,7 +379,6 @@ settings_export(struct config_export_context *ctx,
 
 struct config_export_context *
 config_export_init(const char *const *modules,
-                  const char *const *exclude_settings,
                   enum config_dump_scope scope,
                   enum config_dump_flags flags,
                   config_request_callback_t *callback, void *context)
@@ -397,8 +391,6 @@ config_export_init(const char *const *modules,
        ctx->pool = pool;
 
        ctx->modules = modules == NULL ? NULL : p_strarray_dup(pool, modules);
-       ctx->exclude_settings = exclude_settings == NULL ? NULL :
-               p_strarray_dup(pool, exclude_settings);
        ctx->flags = flags;
        ctx->callback = callback;
        ctx->context = context;
index f0fb8f6b6d632a2c5fe8c8c22b310791ae6bddeb..15ff578ca3eb4c9885c33e11c3c295f7894fa1c4 100644 (file)
@@ -41,7 +41,6 @@ bool config_export_type(string_t *str, const void *value,
                        bool *dump_r) ATTR_NULL(3);
 struct config_export_context *
 config_export_init(const char *const *modules,
-                  const char *const *exclude_settings,
                   enum config_dump_scope scope,
                   enum config_dump_flags flags,
                   config_request_callback_t *callback, void *context)
index e55b54eafb9fbdd3c2d2d75ad4b9814dea8bf34e..3778e1790fc08becb796895684194c3d3a9aa96e 100644 (file)
@@ -154,7 +154,7 @@ config_dump_human_init(const char *const *modules, enum config_dump_scope scope,
                CONFIG_DUMP_FLAG_CALLBACK_ERRORS;
        if (check_settings)
                flags |= CONFIG_DUMP_FLAG_CHECK_SETTINGS;
-       ctx->export_ctx = config_export_init(modules, NULL, scope, flags,
+       ctx->export_ctx = config_export_init(modules, scope, flags,
                                             config_request_get_strings, ctx);
        return ctx;
 }
@@ -1041,7 +1041,7 @@ int main(int argc, char *argv[])
                struct config_export_context *ctx;
                unsigned int section_idx = 0;
 
-               ctx = config_export_init(wanted_modules, NULL, scope,
+               ctx = config_export_init(wanted_modules, scope,
                                         CONFIG_DUMP_FLAG_CHECK_SETTINGS,
                                         config_request_simple_stdout,
                                         setting_name_filters);
@@ -1076,7 +1076,7 @@ int main(int argc, char *argv[])
                struct config_export_context *ctx;
                unsigned int section_idx = 0;
 
-               ctx = config_export_init(wanted_modules, NULL, CONFIG_DUMP_SCOPE_SET,
+               ctx = config_export_init(wanted_modules, CONFIG_DUMP_SCOPE_SET,
                                         CONFIG_DUMP_FLAG_CHECK_SETTINGS,
                                         config_request_putenv, NULL);
                config_export_by_filter(ctx, &filter);