From: Andrew Lewis Date: Mon, 6 Feb 2017 15:05:27 +0000 (+0200) Subject: [Test] Silence warnings X-Git-Tag: 1.5.0~173^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d874a5f2e1a2ea26507839c57ac125fc8b376eda;p=rspamd.git [Test] Silence warnings --- diff --git a/src/plugins/lua/url_redirector.lua b/src/plugins/lua/url_redirector.lua index c4c6823ee..cf90b8de7 100644 --- a/src/plugins/lua/url_redirector.lua +++ b/src/plugins/lua/url_redirector.lua @@ -51,7 +51,7 @@ local function cache_url(task, orig_url, url, key, param) end local function resolve_cached(task, orig_url, url, key, param, ntries) - local function resolve_url(task, orig_url, url, key, param, ntries) + local function resolve_url() if ntries > settings.nested_limit then -- We cannot resolve more, stop rspamd_logger.infox(task, 'cannot get more requests to resolve %s, stop on %s after %s attempts', @@ -115,7 +115,8 @@ local function resolve_cached(task, orig_url, url, key, param, ntries) if nerr then rspamd_logger.errx(task, 'got error while setting redirect keys: %s', nerr) elseif ndata == 1 then - resolve_url(task, url, url, key, param, ntries) + orig_url = url + resolve_url() end end @@ -132,7 +133,7 @@ local function resolve_cached(task, orig_url, url, key, param, ntries) rspamd_logger.errx(task, 'Couldn\'t schedule SETNX') end else - resolve_url(task, orig_url, url, key, param, ntries) + resolve_url() end end