aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-03-18 14:03:14 +0000
committerMatthew Wild <mwild1@gmail.com>2016-03-18 14:03:14 +0000
commit3b6bbde55c734ea709db7dbb3d7e293fa6440220 (patch)
treeebe0522d0120de84cebb9b3b9ed24f1ed3a88961
parent4b4e0feb6e50edf7c7958a670cb9f9fb1c304317 (diff)
downloadprosody-3b6bbde55c734ea709db7dbb3d7e293fa6440220.tar.gz
prosody-3b6bbde55c734ea709db7dbb3d7e293fa6440220.zip
mod_component: Some cleanup [luacheck]
-rw-r--r--plugins/mod_component.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 7709d185..eebaaf3e 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -40,7 +40,7 @@ function module.add_host(module)
local send;
- local function on_destroy(session, err)
+ local function on_destroy(session, err) --luacheck: ignore 212/err
env.connected = false;
env.session = false;
send = nil;
@@ -149,7 +149,7 @@ local stream_callbacks = { default_ns = xmlns_component };
local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams";
-function stream_callbacks.error(session, error, data, data2)
+function stream_callbacks.error(session, error, data)
if session.destroyed then return; end
module:log("warn", "Error processing component stream: %s", tostring(error));
if error == "no-stream" then
@@ -295,7 +295,7 @@ function listener.onconnect(conn)
session.stream:reset();
end
- function session.data(conn, data)
+ function session.data(_, data)
local ok, err = stream:feed(data);
if ok then return; end
module:log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_"));
@@ -323,7 +323,6 @@ function listener.ondisconnect(conn, err)
end
end
session.destroyed = true;
- session = nil;
end
end