Software /
code /
prosody
Comparison
core/s2smanager.lua @ 2379:66ba153d3f09
Backed out changeset 78c5cb163ea9, to fix another way. Haven't done this for a while :)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 17 Dec 2009 21:33:35 +0000 |
parent | 2377:78c5cb163ea9 |
child | 2380:1c7839fbbe9d |
comparison
equal
deleted
inserted
replaced
2377:78c5cb163ea9 | 2379:66ba153d3f09 |
---|---|
364 session.streamid = uuid_gen(); | 364 session.streamid = uuid_gen(); |
365 (session.log or log)("debug", "incoming s2s received <stream:stream>"); | 365 (session.log or log)("debug", "incoming s2s received <stream:stream>"); |
366 send("<?xml version='1.0'?>"); | 366 send("<?xml version='1.0'?>"); |
367 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', | 367 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', |
368 ["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()); | 368 ["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()); |
369 session.notopen = nil; | |
370 if session.to_host and not hosts[session.to_host] then | 369 if session.to_host and not hosts[session.to_host] then |
371 -- Attempting to connect to a host we don't serve | 370 -- Attempting to connect to a host we don't serve |
372 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); | 371 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); |
373 return; | 372 return; |
374 end | 373 end |
411 else | 410 else |
412 mark_connected(session); | 411 mark_connected(session); |
413 end | 412 end |
414 end | 413 end |
415 end | 414 end |
415 | |
416 session.notopen = nil; | |
416 end | 417 end |
417 | 418 |
418 function streamclosed(session) | 419 function streamclosed(session) |
419 (session.log or log)("debug", "</stream:stream>"); | 420 (session.log or log)("debug", "</stream:stream>"); |
420 if session.sends2s then | 421 if session.sends2s then |