X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fxmppstream.lua;h=dede0da94d7b5b60e0d5185ad906c46a105286bf;hb=e89b852ba44f843cb37c1908892680580d9f18ff;hp=1e65919baa62b5248c49b6a205b68606def8775a;hpb=5467d027ba0df940a0a435795417e6f48e289f5e;p=prosody.git diff --git a/util/xmppstream.lua b/util/xmppstream.lua index 1e65919b..dede0da9 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 @@ -249,9 +249,12 @@ 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 + session:stream_attrs(from, to, attr) + end send(""); send(st.stanza("stream:stream", attr):top_tag()); return true;