aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-02-07 12:38:04 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-02-07 12:38:04 +0000
commitf412399cf3ff0c49a643f776050d65a70b5407fd (patch)
tree44dd152ecc3c5116699edf2c9a21f2e45442e21a
parent4d1b94d4c3b4be24df8661b4fc15103a346dfa1e (diff)
downloadrspamd-f412399cf3ff0c49a643f776050d65a70b5407fd.tar.gz
rspamd-f412399cf3ff0c49a643f776050d65a70b5407fd.zip
[Minor] Improve debugging
-rw-r--r--src/plugins/surbl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index a93845d41..c469873a7 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -1128,7 +1128,7 @@ make_surbl_requests (struct rspamd_url *url, struct rspamd_task *task,
param->suffix = suffix;
param->host_resolve =
rspamd_mempool_strdup (task->task_pool, surbl_req);
- debug_task ("send surbl dns ip request %s to %s", surbl_req,
+ msg_debug_surbl ("send surbl dns ip request %s to %s", surbl_req,
suffix->suffix);
if (make_dns_request_task (task,
@@ -1148,7 +1148,7 @@ make_surbl_requests (struct rspamd_url *url, struct rspamd_task *task,
param->suffix = suffix;
param->host_resolve =
rspamd_mempool_strdup (task->task_pool, surbl_req);
- debug_task ("send surbl dns request %s", surbl_req);
+ msg_debug_surbl ("send surbl dns request %s", surbl_req);
if (make_dns_request_task (task,
surbl_dns_callback,
@@ -1197,7 +1197,7 @@ process_dns_results (struct rspamd_task *task,
for (i = 0; i < suffix->bits->len; i ++) {
bit = &g_array_index (suffix->bits, struct surbl_bit_item, i);
- debug_task ("got result(%d) AND bit(%d): %d",
+ msg_debug_surbl ("got result(%d) AND bit(%d): %d",
(gint)addr,
(gint)ntohl (bit->bit),
(gint)bit->bit & (gint)ntohl (addr));
@@ -1553,7 +1553,7 @@ surbl_tree_redirector_callback (gpointer key, gpointer value, void *data)
gchar *found_tld;
task = param->task;
- debug_task ("check url %*s", url->urllen, url->string);
+ msg_debug_surbl ("check url redirection %*s", url->urllen, url->string);
if (url->hostlen <= 0) {
return;
@@ -1628,11 +1628,15 @@ surbl_tree_url_callback (gpointer key, gpointer value, void *data)
{
struct redirector_param *param = data;
struct rspamd_url *url = value;
+ struct rspamd_task *task;
if (url->hostlen <= 0) {
return;
}
+ task = param->task;
+ msg_debug_surbl ("check url %*s", url->urllen, url->string);
+
if (surbl_module_ctx->use_tags && surbl_test_tags (param->task, param, url)) {
return;
}