Changeset

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
parents 1929:b8e6764ffefd
children 1931:f203330eb82e
files core/s2smanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/s2smanager.lua	Tue Oct 06 11:15:55 2009 +0100
+++ b/core/s2smanager.lua	Tue Oct 06 15:02:16 2009 +0100
@@ -358,7 +358,7 @@
 		(session.log or log)("debug", "incoming s2s received <stream:stream>");
 		send("<?xml version='1.0'?>");
 		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, version="1.0" }):top_tag());
+				["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());
 		if session.to_host and not hosts[session.to_host] then
 			-- Attempting to connect to a host we don't serve
 			session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host });