diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-12-26 23:27:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-12-26 23:27:49 +0000 |
commit | 611eae1b23025f80bf5ad36ab62254348feee972 (patch) | |
tree | f2184be5bf3db0ecb7424804aa2b5621f4cda689 /src/plugins/fuzzy_check.c | |
parent | 2ccd109189b31349ac128ad82e5563b585fb0f06 (diff) | |
download | rspamd-611eae1b23025f80bf5ad36ab62254348feee972.tar.gz rspamd-611eae1b23025f80bf5ad36ab62254348feee972.zip |
[Rework] Distinguish between strict config test mode
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r-- | src/plugins/fuzzy_check.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 633ce50ae..9d0aa35e1 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -181,7 +181,7 @@ static void fuzzy_symbol_callback (struct rspamd_task *task, /* Initialization */ gint fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx); -gint fuzzy_check_module_config (struct rspamd_config *cfg); +gint fuzzy_check_module_config (struct rspamd_config *cfg, bool valdate); gint fuzzy_check_module_reconfig (struct rspamd_config *cfg); static gint fuzzy_attach_controller (struct module_ctx *ctx, GHashTable *commands); @@ -940,7 +940,7 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx) } gint -fuzzy_check_module_config (struct rspamd_config *cfg) +fuzzy_check_module_config (struct rspamd_config *cfg, bool validate) { const ucl_object_t *value, *cur, *elt; ucl_object_iter_t it; @@ -969,7 +969,8 @@ fuzzy_check_module_config (struct rspamd_config *cfg) "table and not %s", lua_typename (L, lua_type (L, -1))); fuzzy_module_ctx->enabled = FALSE; - } else { + } + else { lua_pushstring (L, "process_rule"); lua_gettable (L, -2); @@ -1205,7 +1206,7 @@ fuzzy_check_module_reconfig (struct rspamd_config *cfg) fuzzy_module_ctx->process_rule_ref); } - return fuzzy_check_module_config (cfg); + return fuzzy_check_module_config (cfg, false); } /* Finalize IO */ |