From 01fbb05094892e35809b1da9d3778809a70c5e62 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 19 Apr 2012 19:30:47 +0100 Subject: mod_bosh: Log error on BOSH parse failure (thanks daurnimator) --- plugins/mod_bosh.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 834b128a..7b1d8800 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -121,7 +121,10 @@ function handle_request(method, body, request) local stream = new_xmpp_stream(request, stream_callbacks); -- stream:feed() calls the stream_callbacks, so all stanzas in -- the body are processed in this next line before it returns. - stream:feed(body); + local ok, err = stream:feed(body); + if not ok then + log("error", "Failed to parse BOSH payload: %s", err); + end local session = sessions[request.sid]; if session then -- cgit v1.2.3