Software /
code /
prosody
Comparison
core/s2smanager.lua @ 2421:83773aed9437
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 | 2420:6ccd36a95a81 |
child | 2422:affeb565b050 |
comparison
equal
deleted
inserted
replaced
2420:6ccd36a95a81 | 2421:83773aed9437 |
---|---|
367 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); | 367 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); |
368 return; | 368 return; |
369 end | 369 end |
370 send("<?xml version='1.0'?>"); | 370 send("<?xml version='1.0'?>"); |
371 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', | 371 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', |
372 ["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()); | 372 ["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()); |
373 if session.version >= 1.0 then | 373 if session.version >= 1.0 then |
374 local features = st.stanza("stream:features"); | 374 local features = st.stanza("stream:features"); |
375 | 375 |
376 if session.to_host then | 376 if session.to_host then |
377 hosts[session.to_host].events.fire_event("s2s-stream-features", { session = session, features = features }); | 377 hosts[session.to_host].events.fire_event("s2s-stream-features", { session = session, features = features }); |