diff options
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/cfg_file.h | 2 | ||||
-rw-r--r-- | src/libserver/cfg_utils.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 1d782dd8b..b368464a0 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -656,7 +656,7 @@ void rspamd_ucl_add_conf_variables (struct ucl_parser *parser, GHashTable *vars) * @param reconfig * @return */ -gboolean rspamd_init_filters (struct rspamd_config *cfg, bool reconfig); +gboolean rspamd_init_filters (struct rspamd_config *cfg, bool reconfig, bool strict); /** * Add new symbol to the metric diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index bcebb9f93..6a076e673 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -1532,7 +1532,7 @@ rspamd_check_worker (struct rspamd_config *cfg, worker_t *wrk) } gboolean -rspamd_init_filters (struct rspamd_config *cfg, bool reconfig) +rspamd_init_filters (struct rspamd_config *cfg, bool reconfig, bool strict) { GList *cur; module_t *mod, **pmod; @@ -1583,8 +1583,12 @@ rspamd_init_filters (struct rspamd_config *cfg, bool reconfig) } else { if (!mod->module_config_func (cfg)) { - msg_info_config ("config of %s failed!", mod->name); + msg_err_config ("config of %s failed", mod->name); ret = FALSE; + + if (strict) { + return FALSE; + } } } } @@ -1596,7 +1600,7 @@ rspamd_init_filters (struct rspamd_config *cfg, bool reconfig) cur = g_list_next (cur); } - ret = rspamd_init_lua_filters (cfg, 0) && ret; + ret = rspamd_init_lua_filters (cfg, 0, strict) && ret; return ret; } |