aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-12 15:43:27 -0400
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-12 15:43:27 -0400
commit05c27703d2a9ea0e6746fa4ea31956b7b7bdb49d (patch)
tree2bc1d0768f8943f0e2214b1264a683bd8a92e301 /src
parentb33ceaafc151b17cd8c64a40d46b0f0b43bf3787 (diff)
downloadrspamd-05c27703d2a9ea0e6746fa4ea31956b7b7bdb49d.tar.gz
rspamd-05c27703d2a9ea0e6746fa4ea31956b7b7bdb49d.zip
Fix dependencies for surbl module.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/surbl.c5
-rw-r--r--src/plugins/surbl.h1
2 files changed, 6 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
diff --git a/src/plugins/surbl.h b/src/plugins/surbl.h
index e7342be52..76f2bafb9 100644
--- a/src/plugins/surbl.h
+++ b/src/plugins/surbl.h
@@ -53,6 +53,7 @@ struct dns_param {
struct rspamd_task *task;
gchar *host_resolve;
struct suffix_item *suffix;
+ struct rspamd_async_watcher *w;
};
struct redirector_param {