diff options
Diffstat (limited to 'test/rspamd_test_suite.c')
-rw-r--r-- | test/rspamd_test_suite.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c index 97d0565b8..4ba11ea0f 100644 --- a/test/rspamd_test_suite.c +++ b/test/rspamd_test_suite.c @@ -16,10 +16,8 @@ main (int argc, char **argv) rspamd_main = (struct rspamd_main *)g_malloc (sizeof (struct rspamd_main)); memset (rspamd_main, 0, sizeof (struct rspamd_main)); rspamd_main->server_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL); - rspamd_main->cfg = (struct rspamd_config *)g_malloc (sizeof (struct rspamd_config)); - cfg = rspamd_main->cfg; - memset (cfg, 0, sizeof (struct rspamd_config)); - rspamd_init_cfg (cfg, FALSE); + cfg = rspamd_config_new (); + rspamd_main->cfg = cfg; cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL); cfg->log_type = RSPAMD_LOG_CONSOLE; cfg->log_level = G_LOG_LEVEL_INFO; @@ -29,7 +27,7 @@ main (int argc, char **argv) g_test_init (&argc, &argv, NULL); - rspamd_init_libs (); + cfg->libs_ctx = rspamd_init_libs (); rspamd_stat_init (cfg); base = event_init (); |