diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-25 12:24:13 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-25 12:24:13 +0000 |
commit | 65967cdddf5ff8d858ff070bdc7885482408d2b7 (patch) | |
tree | cc0428d41fcf52e97bcd4d6db4c889de9161fb5d | |
parent | 15e9311ce1bfafdcfc520f7543053cddca4541f9 (diff) | |
download | rspamd-65967cdddf5ff8d858ff070bdc7885482408d2b7.tar.gz rspamd-65967cdddf5ff8d858ff070bdc7885482408d2b7.zip |
[Minor] Fix config transformation with no groups
-rw-r--r-- | lualib/rspamd_config_transform.lua | 6 | ||||
-rw-r--r-- | src/rspamadm/configdump.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lualib/rspamd_config_transform.lua b/lualib/rspamd_config_transform.lua index 4f656ca9c..af3e8180e 100644 --- a/lualib/rspamd_config_transform.lua +++ b/lualib/rspamd_config_transform.lua @@ -209,6 +209,12 @@ local function convert_metric(cfg, metric) for k, v in metric_pairs(metric.group) do group_transform(cfg, k, v) end + else + cfg.group = { + ungrouped = { + symbols = {} + } + } end if metric.symbol then diff --git a/src/rspamadm/configdump.c b/src/rspamadm/configdump.c index 6f320dea1..60cd75c36 100644 --- a/src/rspamadm/configdump.c +++ b/src/rspamadm/configdump.c @@ -284,7 +284,6 @@ rspamadm_configdump (gint argc, gchar **argv) } else { /* Do post-load actions */ - rspamd_lua_set_path (cfg->lua_state, cfg->rcl_obj, ucl_vars); rspamd_lua_post_load_config (cfg); if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) { @@ -328,9 +327,5 @@ rspamadm_configdump (gint argc, gchar **argv) } } - if (!ret) { - exit (EXIT_FAILURE); - } - - exit (EXIT_SUCCESS); + exit (ret ? EXIT_SUCCESS : EXIT_FAILURE); } |