aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-10 11:26:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-10 11:26:34 +0100
commitcf96ac1b6f787edd491c0291b5be1a9a3c7136f4 (patch)
treefe86f4dd787e3c7fb1694b3f7cc140eb5c13c4bc /src/plugins
parent684b75db25e80999e720fb8ffabd4eaa9a66c0ab (diff)
downloadrspamd-cf96ac1b6f787edd491c0291b5be1a9a3c7136f4.tar.gz
rspamd-cf96ac1b6f787edd491c0291b5be1a9a3c7136f4.zip
[Minor] Fix url redirector after previous changes
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/url_redirector.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/lua/url_redirector.lua b/src/plugins/lua/url_redirector.lua
index ae20c91ae..22603f288 100644
--- a/src/plugins/lua/url_redirector.lua
+++ b/src/plugins/lua/url_redirector.lua
@@ -46,6 +46,7 @@ local function cache_url(task, orig_url, url, key, param)
rspamd_logger.infox(task, 'trimmed url set to %s elements',
settings.top_urls_count)
end
+ rspamd_plugins.surbl.continue_process(url, param)
end
-- Cleanup logic
@@ -66,14 +67,18 @@ local function cache_url(task, orig_url, url, key, param)
)
if not ret then
rspamd_logger.errx(task, 'cannot trim top urls set')
+ rspamd_plugins.surbl.continue_process(url, param)
else
rspamd_logger.infox(task, 'need to trim urls set from %s to %s elements',
data,
settings.top_urls_count)
+ return
end
end
end
end
+
+ rspamd_plugins.surbl.continue_process(url, param)
end
local function redis_set_cb(err, _)
@@ -90,9 +95,9 @@ local function cache_url(task, orig_url, url, key, param)
)
if not ret then
rspamd_logger.errx(task, 'cannot make redis request to cache results')
+ rspamd_plugins.surbl.continue_process(url, param)
end
end
- rspamd_plugins.surbl.continue_process(url, param)
end
local ret,conn,_ = rspamd_redis_make_request(task,
@@ -188,7 +193,7 @@ local function resolve_cached(task, orig_url, url, key, param, ntries)
local function redis_reserve_cb(nerr, ndata)
if nerr then
rspamd_logger.errx(task, 'got error while setting redirect keys: %s', nerr)
- elseif ndata == 1 then
+ elseif ndata == 'OK' then
orig_url = url
resolve_url()
end