aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-17 15:34:21 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-17 15:34:21 +0100
commit6aa6b6e268e14b1d7d46e806ff862af029a89ebe (patch)
treefd2c2a5bb9bbeba0c26258bc405653ced43fb5d1 /net
parent94f04512127f34d226649124eabf5dbfe4c28d7f (diff)
downloadprosody-6aa6b6e268e14b1d7d46e806ff862af029a89ebe.tar.gz
prosody-6aa6b6e268e14b1d7d46e806ff862af029a89ebe.zip
xmppserver_listener: Use listener log() if session doesn't have one yet (thanks Flo)
Diffstat (limited to 'net')
-rw-r--r--net/xmppserver_listener.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua
index c954fcca..f7ea35f7 100644
--- a/net/xmppserver_listener.lua
+++ b/net/xmppserver_listener.lua
@@ -61,8 +61,8 @@ local function session_reset_stream(session)
function session.data(conn, data)
local ok, err = parser:parse(data);
if ok then return; end
- session.log("warn", "Received invalid XML: %s", data);
- session.log("warn", "Problem was: %s", err);
+ (log or session.log)("warn", "Received invalid XML: %s", data);
+ (log or session.log)("warn", "Problem was: %s", err);
session:close("xml-not-well-formed");
end