Diff

core/s2smanager.lua @ 862:b3b80ccddb0c

Merged with main tip.
author Tobias Markmann <tm@ayena.de>
date Tue, 03 Mar 2009 17:48:04 +0100
parent 852:3c2d99ba1dc2
child 896:2c0b9e3c11c3
line wrap: on
line diff
--- a/core/s2smanager.lua	Sun Feb 22 20:57:57 2009 +0100
+++ b/core/s2smanager.lua	Tue Mar 03 17:48:04 2009 +0100
@@ -206,22 +206,19 @@
 	session.version = 0; --tonumber(attr.version) or 0;
 	
 	if session.version >= 1.0 and not (attr.to and attr.from) then
-		--print("to: "..tostring(attr.to).." from: "..tostring(attr.from));
 		log("warn", (session.to_host or "(unknown)").." failed to specify 'to' or 'from' hostname as per RFC");
 	end
 	
 	if session.direction == "incoming" then
 		-- Send a reply stream header
-		
-		--for k,v in pairs(attr) do print("", tostring(k), ":::", tostring(v)); end
-		
 		session.to_host = attr.to;
 		session.from_host = attr.from;
 	
 		session.streamid = uuid_gen();
 		(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 }):top_tag());
+		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 }):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 });