aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-02-26 02:24:12 +0000
committerMatthew Wild <mwild1@gmail.com>2009-02-26 02:24:12 +0000
commitd0072c9cfab3365c0fe5f8f3bfda87be899c8e13 (patch)
tree21f85881c5f709c7e2a653a8d56d64237737179d /net
parente2908c06e1c8340db7c424c7ef158c2b5674c460 (diff)
downloadprosody-d0072c9cfab3365c0fe5f8f3bfda87be899c8e13.tar.gz
prosody-d0072c9cfab3365c0fe5f8f3bfda87be899c8e13.zip
net/xmppclient_listener: Add some logging and handle unestablished sessions error'ing
Diffstat (limited to 'net')
-rw-r--r--net/xmppclient_listener.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua
index ad1fd948..e7a87c1e 100644
--- a/net/xmppclient_listener.lua
+++ b/net/xmppclient_listener.lua
@@ -29,9 +29,10 @@ local stream_callbacks = { stream_tag = "http://etherx.jabber.org/streams|stream
function stream_callbacks.error(session, error, data)
if error == "no-stream" then
+ session.log("debug", "Invalid opening stream header");
session:close("invalid-namespace");
- else
- session.log("debug", "Client XML parse error: %s", tostring(error));
+ elseif session.close then
+ (session.log or log)("debug", "Client XML parse error: %s", tostring(error));
session:close("xml-not-well-formed");
end
end