aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners/kaspersky_av.lua
diff options
context:
space:
mode:
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-09-26 22:56:36 +0200
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-09-26 22:56:36 +0200
commitcb1fb98db95bb42ba43c98b8c390748f7ac9c300 (patch)
treed2400d79b2c04b9c1e35651c91b0db0fceb132a5 /lualib/lua_scanners/kaspersky_av.lua
parent8bd1b26f6fef45b8d60ae9edd0bf7f891cf48e55 (diff)
downloadrspamd-cb1fb98db95bb42ba43c98b8c390748f7ac9c300.tar.gz
rspamd-cb1fb98db95bb42ba43c98b8c390748f7ac9c300.zip
[Minor] lua_scanners - simplify need_check and dynamic_scan
Diffstat (limited to 'lualib/lua_scanners/kaspersky_av.lua')
-rw-r--r--lualib/lua_scanners/kaspersky_av.lua19
1 files changed, 4 insertions, 15 deletions
diff --git a/lualib/lua_scanners/kaspersky_av.lua b/lualib/lua_scanners/kaspersky_av.lua
index 87411c3b9..cb652f5b6 100644
--- a/lualib/lua_scanners/kaspersky_av.lua
+++ b/lualib/lua_scanners/kaspersky_av.lua
@@ -162,19 +162,11 @@ local function kaspersky_check(task, content, digest, rule)
end
end
if cached then
- common.save_av_cache(task, digest, rule, cached)
+ common.save_cache(task, digest, rule, cached)
end
end
end
- if rule.dynamic_scan then
- local pre_check, pre_check_msg = common.check_metric_results(task, rule)
- if pre_check then
- rspamd_logger.infox(task, '%s: aborting: %s', rule.log_prefix, pre_check_msg)
- return true
- end
- end
-
tcp.request({
task = task,
host = addr:to_string(),
@@ -186,13 +178,10 @@ local function kaspersky_check(task, content, digest, rule)
})
end
- if common.need_av_check(task, content, rule) then
- if common.check_av_cache(task, digest, rule, kaspersky_check_uncached) then
- return
- else
- kaspersky_check_uncached()
- end
+ if common.need_check(task, content, rule, digest) then
+ kaspersky_check_uncached()
end
+
end
return {