From b3ba3d42086d67611ba7bf6c78591e41ad0c0b7a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 29 Jan 2016 10:17:54 +0000 Subject: Fix other usages of ottery_init --- src/libserver/worker_util.c | 2 +- src/rspamadm/rspamadm.c | 1 - src/rspamd.c | 1 - 3 files changed, 1 insertion(+), 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 (); } -- cgit v1.2.3