Comparison

core/s2smanager.lua @ 2787:1067a454a068

s2smanager: Stamp a 'to' on the reply stream:stream. This makes prosody happy.
author Paul Aurich <paul@darkrain42.org>
date Sun, 03 Jan 2010 11:26:36 -0800
parent 2783:57611584e27d
child 2799:0dc7b5ceaf8f
comparison
equal deleted inserted replaced
2786:534e171036ef 2787:1067a454a068
377 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); 377 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host });
378 return; 378 return;
379 end 379 end
380 send("<?xml version='1.0'?>"); 380 send("<?xml version='1.0'?>");
381 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', 381 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback',
382 ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host, version=(session.version > 0 and "1.0" or nil) }):top_tag()); 382 ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host, to=session.from_host, version=(session.version > 0 and "1.0" or nil) }):top_tag());
383 if session.version >= 1.0 then 383 if session.version >= 1.0 then
384 local features = st.stanza("stream:features"); 384 local features = st.stanza("stream:features");
385 385
386 if session.to_host then 386 if session.to_host then
387 hosts[session.to_host].events.fire_event("s2s-stream-features", { session = session, features = features }); 387 hosts[session.to_host].events.fire_event("s2s-stream-features", { session = session, features = features });