aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-03-03 17:48:04 +0100
committerTobias Markmann <tm@ayena.de>2009-03-03 17:48:04 +0100
commit7a7a89844a038b071f02fd1af309ba9ebbcda7de (patch)
tree73946c977be10a965d59de85b3ce6ba3743bc771 /core/s2smanager.lua
parent3d1e7adbbc0afb8395f02ecd42fe3c38ce6a8d36 (diff)
parentb6b9906c3c653935b55ad79ad4a2c41118f0a0e3 (diff)
downloadprosody-7a7a89844a038b071f02fd1af309ba9ebbcda7de.tar.gz
prosody-7a7a89844a038b071f02fd1af309ba9ebbcda7de.zip
Merged with main tip.
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 4f205418..db6d2fe5 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -206,22 +206,19 @@ function streamopened(session, attr)
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 });