From 1bb5caff25d1a15f0d89f4b4c8c29f30d52d5f67 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 23 Aug 2014 09:22:05 +0100 Subject: util.xmppstream: When error is 'no-stream', pass the received tagname to the error handler --- util/xmppstream.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/xmppstream.lua') diff --git a/util/xmppstream.lua b/util/xmppstream.lua index 73f5e314..138c86b7 100644 --- a/util/xmppstream.lua +++ b/util/xmppstream.lua @@ -109,7 +109,7 @@ function new_sax_handlers(session, stream_callbacks, cb_handleprogress) end else -- Garbage before stream? - cb_error(session, "no-stream"); + cb_error(session, "no-stream", tagname); end return; end -- cgit v1.2.3 From 6007de18c4db1acae2bb17c9d2aaad3b1ef994f5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 27 Aug 2014 13:00:04 +0200 Subject: util.xmppstream: Don't include empty stream ID in stream header (got here from mod_c2s) --- util/xmppstream.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/xmppstream.lua') diff --git a/util/xmppstream.lua b/util/xmppstream.lua index 6982aae3..5848e200 100644 --- a/util/xmppstream.lua +++ b/util/xmppstream.lua @@ -249,7 +249,7 @@ function new(session, stream_callbacks, stanza_size_limit) ["xml:lang"] = "en", xmlns = stream_callbacks.default_ns, version = session.version and (session.version > 0 and "1.0" or nil), - id = session.streamid or "", + id = session.streamid, from = from or session.host, to = to, }; if session.stream_attrs then -- cgit v1.2.3