]> source.dussan.org Git - rspamd.git/commitdiff
* Move evdns initializing to workers
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Tue, 5 May 2009 13:17:29 +0000 (17:17 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Tue, 5 May 2009 13:17:29 +0000 (17:17 +0400)
src/plugins/surbl.c
src/worker.c

index aacc7120b0dfec76613f8d1995554d6b8e2a5eee..a5c1bd4b480b6113b5ea49a618c22d89d2bdf212 100644 (file)
@@ -87,7 +87,6 @@ surbl_module_config (struct config_file *cfg)
        char *value, *cur_tok, *str;
        uint32_t bit;
 
-       evdns_init ();
 
        if ((value = get_module_opt (cfg, "surbl", "redirector")) != NULL) {
                str = memory_pool_strdup (surbl_module_ctx->surbl_pool, value);
index da454d01316b4953c7259126f8de5ec8c6281b67..3f223241bf4fbe0751c3bfbf20b15839c95bebb9 100644 (file)
@@ -36,6 +36,8 @@
 #include "modules.h"
 #include "message.h"
 
+#include <evdns.h>
+
 #ifndef WITHOUT_PERL
 #include <EXTERN.h>               /* from the Perl distribution     */
 #include <perl.h>                 /* from the Perl distribution     */
@@ -343,6 +345,8 @@ start_worker (struct rspamd_worker *worker, int listen_sock)
        worker->srv->type = TYPE_WORKER;
 
        event_init ();
+       evdns_init ();
+
        init_signals (&signals, sig_handler);
        sigprocmask (SIG_UNBLOCK, &signals.sa_mask, NULL);