From: Vsevolod Stakhov Date: Tue, 25 Nov 2014 18:07:58 +0000 (+0000) Subject: Fill surbl field in struct uri. X-Git-Tag: 0.8.0~96 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5cbdcc1742e39cbb430c29f69dbc4e35c7fa0377;p=rspamd.git Fill surbl field in struct uri. --- 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;