diff options
Diffstat (limited to 'src/rspamd.c')
-rw-r--r-- | src/rspamd.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/rspamd.c b/src/rspamd.c index 1a08c938f..828720cae 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -68,7 +68,8 @@ static gboolean load_rspamd_config (struct rspamd_main *rspamd_main, struct rspamd_config *cfg, gboolean init_modules, enum rspamd_post_load_options opts, - gboolean reload); + gboolean reload, + GHashTable *vars); /* Control socket */ static gint control_fd; @@ -287,7 +288,8 @@ reread_config (struct rspamd_main *rspamd_main) rspamd_main->cfg = tmp_cfg; if (!load_rspamd_config (rspamd_main, tmp_cfg, TRUE, - RSPAMD_CONFIG_INIT_VALIDATE|RSPAMD_CONFIG_INIT_SYMCACHE, TRUE)) { + RSPAMD_CONFIG_INIT_VALIDATE|RSPAMD_CONFIG_INIT_SYMCACHE, + TRUE, ucl_vars)) { rspamd_main->cfg = old_cfg; rspamd_log_close_priv (rspamd_main->logger, rspamd_main->workers_uid, @@ -825,7 +827,8 @@ static gboolean load_rspamd_config (struct rspamd_main *rspamd_main, struct rspamd_config *cfg, gboolean init_modules, enum rspamd_post_load_options opts, - gboolean reload) + gboolean reload, + GHashTable *vars) { cfg->compiled_modules = modules; cfg->compiled_workers = workers; @@ -854,7 +857,7 @@ load_rspamd_config (struct rspamd_main *rspamd_main, rspamd_lua_post_load_config (cfg); if (init_modules) { - rspamd_init_filters (cfg, reload); + rspamd_init_filters (cfg, reload, vars); } /* Do post-load actions */ @@ -1220,7 +1223,8 @@ main (gint argc, gchar **argv, gchar **env) rspamd_main->workers_gid); if (config_test || dump_cache) { - if (!load_rspamd_config (rspamd_main, rspamd_main->cfg, FALSE, 0, FALSE)) { + if (!load_rspamd_config (rspamd_main, rspamd_main->cfg, FALSE, 0, + FALSE, ucl_vars)) { exit (EXIT_FAILURE); } @@ -1243,7 +1247,7 @@ main (gint argc, gchar **argv, gchar **env) /* Load config */ if (!load_rspamd_config (rspamd_main, rspamd_main->cfg, TRUE, - RSPAMD_CONFIG_LOAD_ALL, FALSE)) { + RSPAMD_CONFIG_LOAD_ALL, FALSE, ucl_vars)) { exit (EXIT_FAILURE); } |