aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_c2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-07-30 02:29:36 +0200
committerKim Alvefur <zash@zash.se>2019-07-30 02:29:36 +0200
commit40b1e3e0ed1223517f29bcf136fc08a6f33b17f2 (patch)
treed9c5e487acf897127720acb3e5109a5e87eb9a2d /plugins/mod_c2s.lua
parent0e16eeb216d52e4cce2457fae31e1618a8b6e446 (diff)
downloadprosody-40b1e3e0ed1223517f29bcf136fc08a6f33b17f2.tar.gz
prosody-40b1e3e0ed1223517f29bcf136fc08a6f33b17f2.zip
plugins: Remove tostring call from logging
Taken care of by loggingmanager now Mass-rewrite using lua pattern like `tostring%b()`
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r--plugins/mod_c2s.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index bfec1055..53af34f0 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -127,7 +127,7 @@ function stream_callbacks.error(session, error, data)
session.log("debug", "Invalid opening stream header (%s)", (data:gsub("^([^\1]+)\1", "{%1}")));
session:close("invalid-namespace");
elseif error == "parse-error" then
- (session.log or log)("debug", "Client XML parse error: %s", tostring(data));
+ (session.log or log)("debug", "Client XML parse error: %s", data);
session:close("not-well-formed");
elseif error == "stream-error" then
local condition, text = "undefined-condition";
@@ -289,7 +289,7 @@ function listener.onconnect(conn)
if data then
local ok, err = stream:feed(data);
if not ok then
- log("debug", "Received invalid XML (%s) %d bytes: %q", tostring(err), #data, data:sub(1, 300));
+ log("debug", "Received invalid XML (%s) %d bytes: %q", err, #data, data:sub(1, 300));
session:close("not-well-formed");
end
end