aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-10-11 17:49:57 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-10-11 17:49:57 +0200
commitdf6e0e979fe425af8fde9f0811a52be6a78c208c (patch)
treec595f904cad0ff0d199b98f4edfaacedac0271cd
parent237e498ff32ddf6653c0a3723aed5e5ae19efa8a (diff)
downloadrspamd-df6e0e979fe425af8fde9f0811a52be6a78c208c.tar.gz
rspamd-df6e0e979fe425af8fde9f0811a52be6a78c208c.zip
[Minor] Antivirus module: use suitable scan ID for F-Prot
-rw-r--r--src/plugins/lua/antivirus.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua
index f5d30cbee..2ca43f8df 100644
--- a/src/plugins/lua/antivirus.lua
+++ b/src/plugins/lua/antivirus.lua
@@ -203,7 +203,9 @@ local function fprot_check(task, rule)
local upstream = rule.upstreams:get_upstream_round_robin()
local addr = upstream:get_addr()
local retransmits = rule.retransmits
- local header = string.format('SCAN STREAM 1 SIZE %d\n', task:get_size())
+ local scan_id = task:get_queue_id()
+ if not scan_id then scan_id = task:get_uid() end
+ local header = string.format('SCAN STREAM %s SIZE %d\n', scan_id, task:get_size())
local footer = '\n'
local function fprot_callback(err, data)
@@ -234,7 +236,7 @@ local function fprot_check(task, rule)
local found = (string.sub(data, 1, 1) == '1')
local cached = 'OK'
if found then
- local vname = string.match(data, '^1 <infected: (.+)> 1')
+ local vname = string.match(data, '^1 <infected: (.+)>')
yield_result(task, rule, vname)
cached = vname
end