diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-10-25 21:06:35 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-10-25 21:06:35 +0500 |
commit | 8f2c13031523bd23ce4418a72273ca355a52182a (patch) | |
tree | b829ca5c0a6ac9a5fca06ac68907bb260dd21c21 /net | |
parent | 598ddfd001374594677f48826263358606bafb73 (diff) | |
download | prosody-8f2c13031523bd23ce4418a72273ca355a52182a.tar.gz prosody-8f2c13031523bd23ce4418a72273ca355a52182a.zip |
xmppserver_listener: Minor logging fix: Prefer the session logger when available to log invalid XML warnings.
Diffstat (limited to 'net')
-rw-r--r-- | net/xmppserver_listener.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua index f7ea35f7..fa6acbb7 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 - (log or session.log)("warn", "Received invalid XML: %s", data); - (log or session.log)("warn", "Problem was: %s", err); + (session.log or log)("warn", "Received invalid XML: %s", data); + (session.log or log)("warn", "Problem was: %s", err); session:close("xml-not-well-formed"); end |