aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-29 10:17:54 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-29 10:17:54 +0000
commitb3ba3d42086d67611ba7bf6c78591e41ad0c0b7a (patch)
tree22e5d69fbbdac337905a9182a13ac13a4f5699b6
parentab9ccf06ea9e3122c1fe43c3cc162c36d14ccc7d (diff)
downloadrspamd-b3ba3d42086d67611ba7bf6c78591e41ad0c0b7a.tar.gz
rspamd-b3ba3d42086d67611ba7bf6c78591e41ad0c0b7a.zip
Fix other usages of ottery_init
-rw-r--r--src/libserver/worker_util.c2
-rw-r--r--src/rspamadm/rspamadm.c1
-rw-r--r--src/rspamd.c1
3 files changed, 1 insertions, 3 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c
index 9733bda3f..49b52205b 100644
--- a/src/libserver/worker_util.c
+++ b/src/libserver/worker_util.c
@@ -486,7 +486,7 @@ rspamd_fork_worker (struct rspamd_main *rspamd_main,
event_base_free (rspamd_main->ev_base);
/* Lock statfile pool if possible XXX */
/* Init PRNG after fork */
- rc = ottery_init (NULL);
+ rc = ottery_init (rspamd_main->cfg->libs_ctx->ottery_cfg);
if (rc != OTTERY_ERR_NONE) {
msg_err_main ("cannot initialize PRNG: %d", rc);
g_assert (0);
diff --git a/src/rspamadm/rspamadm.c b/src/rspamadm/rspamadm.c
index 735f1299d..02bdd310f 100644
--- a/src/rspamadm/rspamadm.c
+++ b/src/rspamadm/rspamadm.c
@@ -272,7 +272,6 @@ main (gint argc, gchar **argv, gchar **env)
ucl_vars = g_hash_table_new_full (rspamd_strcase_hash,
rspamd_strcase_equal, g_free, g_free);
- ottery_init (NULL);
process_quark = g_quark_from_static_string ("rspamadm");
cfg = rspamd_config_new ();
cfg->libs_ctx = rspamd_init_libs ();
diff --git a/src/rspamd.c b/src/rspamd.c
index a71b58810..c99cfe889 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -178,7 +178,6 @@ read_cmd_line (gint *argc, gchar ***argv, struct rspamd_config *cfg)
r = fork ();
if (r == 0) {
/* Spawning new main process */
- ottery_init (NULL);
cfg->cfg_name = cfg_names[i];
(void)setsid ();
}