aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners
diff options
context:
space:
mode:
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-10-01 21:00:17 +0200
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-10-01 21:00:17 +0200
commite273a7d2cb8a94949e5aaf6b8efd9b78b7c6a17e (patch)
treeb1ccbe9d1f1f673478c64ef0ea1ff262da27f08d /lualib/lua_scanners
parentc2f92d020239d41f266839fbe1469608f35af376 (diff)
downloadrspamd-e273a7d2cb8a94949e5aaf6b8efd9b78b7c6a17e.tar.gz
rspamd-e273a7d2cb8a94949e5aaf6b8efd9b78b7c6a17e.zip
[Minor] Fix lua warnings
Diffstat (limited to 'lualib/lua_scanners')
-rw-r--r--lualib/lua_scanners/icap.lua14
-rw-r--r--lualib/lua_scanners/oletools.lua3
2 files changed, 9 insertions, 8 deletions
diff --git a/lualib/lua_scanners/icap.lua b/lualib/lua_scanners/icap.lua
index 8312d20b9..92187fb76 100644
--- a/lualib/lua_scanners/icap.lua
+++ b/lualib/lua_scanners/icap.lua
@@ -285,8 +285,8 @@ local function icap_check(task, content, digest, rule)
end
end
- local function icap_r_respond_cb(err, data, conn)
- if err or conn == nil then
+ local function icap_r_respond_cb(error, data, connection)
+ if error or connection == nil then
icap_requery(err, "icap_r_respond_cb")
else
local result = tostring(data)
@@ -315,16 +315,16 @@ local function icap_check(task, content, digest, rule)
end
end
- local function icap_w_respond_cb(err, conn)
- if err or conn == nil then
+ local function icap_w_respond_cb(error, connection)
+ if error or connection == nil then
icap_requery(err, "icap_w_respond_cb")
else
- conn:add_read(icap_r_respond_cb, '\r\n\r\n')
+ connection:add_read(icap_r_respond_cb, '\r\n\r\n')
end
end
- local function icap_r_options_cb(err, data, conn)
- if err or conn == nil then
+ local function icap_r_options_cb(error, data, connection)
+ if error or connection == nil then
icap_requery(err, "icap_r_options_cb")
else
local icap_headers = icap_result_header_table(tostring(data))
diff --git a/lualib/lua_scanners/oletools.lua b/lualib/lua_scanners/oletools.lua
index 88ecfdece..1f861f6a7 100644
--- a/lualib/lua_scanners/oletools.lua
+++ b/lualib/lua_scanners/oletools.lua
@@ -195,7 +195,8 @@ local function oletools_check(task, content, digest, rule)
rspamd_logger.errx(task, '%s: Error message: %s',
rule.log_prefix, result[2]['message'])
oletools_requery(oletools_rc[result[3]['return_code']])
- elseif type(result[2]['analysis']) == 'table' and #result[2]['analysis'] == 0 and #result[2]['macros'] == 0 then
+ elseif type(result[2]['analysis']) == 'table' and #result[2]['analysis'] == 0
+ and #result[2]['macros'] == 0 then
rspamd_logger.warnx(task, '%s: maybe unhandled python or oletools error', rule.log_prefix)
common.yield_result(task, rule, 'oletools unhandled error', 0.0, 'fail')
elseif type(result[2]['analysis']) ~= 'table' and #result[2]['macros'] == 0 then