equal
deleted
inserted
replaced
131 session.from_host = attr.from; |
131 session.from_host = attr.from; |
132 |
132 |
133 session.streamid = uuid_gen(); |
133 session.streamid = uuid_gen(); |
134 print(session, session.from_host, "incoming s2s stream opened"); |
134 print(session, session.from_host, "incoming s2s stream opened"); |
135 send("<?xml version='1.0'?>"); |
135 send("<?xml version='1.0'?>"); |
136 send(format("<stream:stream xmlns='jabber:server' xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s'>", session.streamid, session.to_host)); |
136 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host })); |
137 elseif session.direction == "outgoing" then |
137 elseif session.direction == "outgoing" then |
138 -- If we are just using the connection for verifying dialback keys, we won't try and auth it |
138 -- If we are just using the connection for verifying dialback keys, we won't try and auth it |
139 if not attr.id then error("stream response did not give us a streamid!!!"); end |
139 if not attr.id then error("stream response did not give us a streamid!!!"); end |
140 session.streamid = attr.id; |
140 session.streamid = attr.id; |
141 |
141 |