From 5cbdcc1742e39cbb430c29f69dbc4e35c7fa0377 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 25 Nov 2014 18:07:58 +0000 Subject: [PATCH] Fill surbl field in struct uri. --- src/plugins/surbl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index 8e4c41205..3c141256d 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -576,7 +576,8 @@ format_surbl_request (rspamd_mempool_t * pool, gboolean append_suffix, GError ** err, gboolean forced, - GTree *tree) + GTree *tree, + struct uri *url) { GHashTable *t; gchar *result = NULL, *dots[MAX_LEVELS], @@ -710,6 +711,9 @@ format_surbl_request (rspamd_mempool_t * pool, } } + url->surbl = result; + url->surbllen = r; + if (tree != NULL) { if (g_tree_lookup (tree, result) != NULL) { msg_debug ("url %s is already registered", result); @@ -762,7 +766,7 @@ make_surbl_requests (struct uri *url, struct rspamd_task *task, f.len = url->hostlen; if ((surbl_req = format_surbl_request (task->task_pool, &f, suffix, TRUE, - &err, forced, tree)) != NULL) { + &err, forced, tree, url)) != NULL) { param = rspamd_mempool_alloc (task->task_pool, sizeof (struct dns_param)); param->url = url; -- 2.39.5