diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-10 23:41:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-10 23:41:34 +0100 |
commit | 43fabec7e1b1db64bf6d36839f601f18da7bda91 (patch) | |
tree | c5e1e879aa871c5ef00954b9fd80ad3d84a21894 /src/main.c | |
parent | 347a46329722cb05d2b968e749773a1d0c2594ca (diff) | |
download | rspamd-43fabec7e1b1db64bf6d36839f601f18da7bda91.tar.gz rspamd-43fabec7e1b1db64bf6d36839f601f18da7bda91.zip |
Fix C modules initialization on restart.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c index 84b611822..d4bd66b78 100644 --- a/src/main.c +++ b/src/main.c @@ -408,6 +408,8 @@ reread_config (struct rspamd_main *rspamd) /* Save some variables */ tmp_cfg->cfg_name = cfg_file; + tmp_cfg->c_modules = g_hash_table_ref (rspamd->cfg->c_modules); + if (!load_rspamd_config (tmp_cfg, FALSE)) { rspamd_set_logger (rspamd_main->cfg, g_quark_try_string ( "main"), rspamd_main); @@ -852,9 +854,7 @@ load_rspamd_config (struct rspamd_config *cfg, gboolean init_modules) while (l) { filt = l->data; if (filt->module) { - cur_module = - rspamd_mempool_alloc (cfg->cfg_pool, - sizeof (struct module_ctx)); + cur_module = g_slice_alloc0 (sizeof (struct module_ctx)); if (filt->module->module_init_func (cfg, &cur_module) == 0) { g_hash_table_insert (cfg->c_modules, (gpointer) filt->module->name, |