diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-12 15:43:27 -0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-12 15:43:27 -0400 |
commit | 05c27703d2a9ea0e6746fa4ea31956b7b7bdb49d (patch) | |
tree | 2bc1d0768f8943f0e2214b1264a683bd8a92e301 /src/plugins/surbl.c | |
parent | b33ceaafc151b17cd8c64a40d46b0f0b43bf3787 (diff) | |
download | rspamd-05c27703d2a9ea0e6746fa4ea31956b7b7bdb49d.tar.gz rspamd-05c27703d2a9ea0e6746fa4ea31956b7b7bdb49d.zip |
Fix dependencies for surbl module.
Diffstat (limited to 'src/plugins/surbl.c')
-rw-r--r-- | src/plugins/surbl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index 7528a802d..07ccda52f 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -855,10 +855,13 @@ make_surbl_requests (struct rspamd_url *url, struct rspamd_task *task, param->host_resolve = rspamd_mempool_strdup (task->task_pool, surbl_req); debug_task ("send surbl dns request %s", surbl_req); + if (make_dns_request (task->resolver, task->s, task->task_pool, dns_callback, (void *)param, RDNS_REQUEST_A, surbl_req)) { task->dns_requests++; + param->w = rspamd_session_get_watcher (task->s); + rspamd_session_watcher_push (task->s); } } else if (err != NULL && err->code != WHITELIST_ERROR && err->code != @@ -934,6 +937,8 @@ dns_callback (struct rdns_reply *reply, gpointer arg) param->task->message_id, param->host_resolve, param->suffix->suffix); } + + rspamd_session_watcher_pop (param->task->s, param->w); } static void |