core/s2smanager.lua

changeset 252
a698993bd49b
parent 244
0e3bda34f958
child 253
f2869ded1d37
equal deleted inserted replaced
251:5b6dec537914 252:a698993bd49b
133 session.from_host = attr.from; 133 session.from_host = attr.from;
134 134
135 session.streamid = uuid_gen(); 135 session.streamid = uuid_gen();
136 print(session, session.from_host, "incoming s2s stream opened"); 136 print(session, session.from_host, "incoming s2s stream opened");
137 send("<?xml version='1.0'?>"); 137 send("<?xml version='1.0'?>");
138 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 })); 138 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 }):top_tag());
139 elseif session.direction == "outgoing" then 139 elseif session.direction == "outgoing" then
140 -- If we are just using the connection for verifying dialback keys, we won't try and auth it 140 -- If we are just using the connection for verifying dialback keys, we won't try and auth it
141 if not attr.id then error("stream response did not give us a streamid!!!"); end 141 if not attr.id then error("stream response did not give us a streamid!!!"); end
142 session.streamid = attr.id; 142 session.streamid = attr.id;
143 143

mercurial