Software /
code /
prosody
Comparison
core/s2smanager.lua @ 1930:92b78dd346ca
s2smanager: Don't send version=1.0 in reply to incoming stream tag if they didn't advertise 1.0 (makes happy some old ejabberd versions)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 06 Oct 2009 15:02:16 +0100 |
parent | 1928:d11f07ca0b75 |
child | 1936:a6ca0dcc7b83 |
comparison
equal
deleted
inserted
replaced
1929:b8e6764ffefd | 1930:92b78dd346ca |
---|---|
356 | 356 |
357 session.streamid = uuid_gen(); | 357 session.streamid = uuid_gen(); |
358 (session.log or log)("debug", "incoming s2s received <stream:stream>"); | 358 (session.log or log)("debug", "incoming s2s received <stream:stream>"); |
359 send("<?xml version='1.0'?>"); | 359 send("<?xml version='1.0'?>"); |
360 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', | 360 send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', |
361 ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host, version="1.0" }):top_tag()); | 361 ["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()); |
362 if session.to_host and not hosts[session.to_host] then | 362 if session.to_host and not hosts[session.to_host] then |
363 -- Attempting to connect to a host we don't serve | 363 -- Attempting to connect to a host we don't serve |
364 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); | 364 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); |
365 return; | 365 return; |
366 end | 366 end |