diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-18 15:19:36 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-18 15:19:36 +0000 |
commit | ceb133b5e603c04cfa5c8da8851c8134523e0ee9 (patch) | |
tree | 631e1f166147a6a5bf3b6b1c50527f1514e2f4e3 /src/rspamadm | |
parent | b33f3fa4cfa42f1b92192ff18eb893b8bd93a1e9 (diff) | |
download | rspamd-ceb133b5e603c04cfa5c8da8851c8134523e0ee9.tar.gz rspamd-ceb133b5e603c04cfa5c8da8851c8134523e0ee9.zip |
Fix issues found
Diffstat (limited to 'src/rspamadm')
-rw-r--r-- | src/rspamadm/configdump.c | 12 | ||||
-rw-r--r-- | src/rspamadm/configtest.c | 14 | ||||
-rw-r--r-- | src/rspamadm/rspamadm.c | 5 |
3 files changed, 4 insertions, 27 deletions
diff --git a/src/rspamadm/configdump.c b/src/rspamadm/configdump.c index d19d2da33..e40f2f34a 100644 --- a/src/rspamadm/configdump.c +++ b/src/rspamadm/configdump.c @@ -173,25 +173,15 @@ rspamadm_configdump (gint argc, gchar **argv) } else { /* Do post-load actions */ - rspamd_config_post_load (cfg); + rspamd_config_post_load (cfg, FALSE); ret = TRUE; } if (ret) { - rspamd_symbols_cache_init (rspamd_main->cfg->cache); if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) { ret = FALSE; } - - /* Insert classifiers symbols */ - (void) rspamd_config_insert_classify_symbols (rspamd_main->cfg); - - if (!rspamd_symbols_cache_validate (rspamd_main->cfg->cache, - rspamd_main->cfg, - FALSE)) { - ret = FALSE; - } } if (ret) { diff --git a/src/rspamadm/configtest.c b/src/rspamadm/configtest.c index 1de694975..65f358f66 100644 --- a/src/rspamadm/configtest.c +++ b/src/rspamadm/configtest.c @@ -150,25 +150,13 @@ rspamadm_configtest (gint argc, gchar **argv) } else { /* Do post-load actions */ - rspamd_config_post_load (cfg); - ret = TRUE; + ret = rspamd_config_post_load (cfg, TRUE); } if (ret) { - rspamd_symbols_cache_init (rspamd_main->cfg->cache); - if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) { ret = FALSE; } - - /* Insert classifiers symbols */ - (void) rspamd_config_insert_classify_symbols (rspamd_main->cfg); - - if (!rspamd_symbols_cache_validate (rspamd_main->cfg->cache, - rspamd_main->cfg, - FALSE)) { - ret = FALSE; - } } if (strict && ret) { diff --git a/src/rspamadm/rspamadm.c b/src/rspamadm/rspamadm.c index c4ae62a4b..5751c50d0 100644 --- a/src/rspamadm/rspamadm.c +++ b/src/rspamadm/rspamadm.c @@ -208,10 +208,9 @@ main (gint argc, gchar **argv, gchar **env) rspamd_strcase_equal, g_free, g_free); ottery_init (NULL); process_quark = g_quark_from_static_string ("rspamadm"); - cfg = g_malloc0 (sizeof (*cfg)); + cfg = rspamd_config_defaults (); + cfg->libs_ctx = rspamd_init_libs (); rspamd_main = g_malloc0 (sizeof (*rspamd_main)); - rspamd_init_libs (); - rspamd_init_cfg (cfg, TRUE); rspamd_main->cfg = cfg; rspamd_main->pid = getpid (); rspamd_main->type = process_quark; |