Software /
code /
prosody
Comparison
plugins/mod_component.lua @ 4803:39ba097ec641
mod_component: Send <?xml on initial stream (thanks xnyhps)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 30 Apr 2012 00:42:02 +0100 |
parent | 4757:5fb68e68ba0b |
child | 4805:1aeece2cc814 |
comparison
equal
deleted
inserted
replaced
4802:916c35d6105f | 4803:39ba097ec641 |
---|---|
156 end | 156 end |
157 session.host = attr.to; | 157 session.host = attr.to; |
158 session.streamid = uuid_gen(); | 158 session.streamid = uuid_gen(); |
159 session.notopen = nil; | 159 session.notopen = nil; |
160 -- Return stream header | 160 -- Return stream header |
161 session.send("<?xml version='1.0'?>"); | |
161 session.send(st.stanza("stream:stream", { xmlns=xmlns_component, | 162 session.send(st.stanza("stream:stream", { xmlns=xmlns_component, |
162 ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.host }):top_tag()); | 163 ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.host }):top_tag()); |
163 end | 164 end |
164 | 165 |
165 function stream_callbacks.streamclosed(session) | 166 function stream_callbacks.streamclosed(session) |