Software /
code /
prosody
Changeset
2052:161db352822c
xmppserver_listener: Minor logging fix: Prefer the session logger when available to log invalid XML warnings.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 25 Oct 2009 21:06:35 +0500 |
parents | 2051:2567f4bf0085 |
children | 2053:f5a198127dd3 |
files | net/xmppserver_listener.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/xmppserver_listener.lua Sun Oct 25 04:19:24 2009 +0500 +++ b/net/xmppserver_listener.lua Sun Oct 25 21:06:35 2009 +0500 @@ -61,8 +61,8 @@ 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