aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-01 18:28:46 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-01 18:28:46 +0000
commit7a2fc45f65a14933f2ab8e83d6ae9487b59e6a79 (patch)
tree39004e04e0340addbdabe7af101217470af4cafd /core/stanza_router.lua
parent40726a8a0acbcc2169031c58fc67aa7d6ee1b311 (diff)
downloadprosody-7a2fc45f65a14933f2ab8e83d6ae9487b59e6a79.tar.gz
prosody-7a2fc45f65a14933f2ab8e83d6ae9487b59e6a79.zip
General fixes for s2s, to make it more robust (I hope), sending data to remote hosts sane (s2ssession.send() works as expected), recycle outgoing dialback connections, etc.
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index e98d6794..3333354e 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -23,7 +23,7 @@ local jid_split = require "util.jid".split;
local print = print;
function core_process_stanza(origin, stanza)
- log("debug", "Received: "..tostring(stanza))
+ log("debug", "Received["..origin.type.."]: "..tostring(stanza))
-- TODO verify validity of stanza (as well as JID validity)
if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then
if stanza.attr.type == "set" or stanza.attr.type == "get" then
@@ -137,9 +137,9 @@ function core_handle_stanza(origin, stanza)
origin.from_host = attr.from;
origin.to_host = attr.to;
origin.dialback_key = stanza[1];
- log("debug", "asking %s if key %s belongs to them", attr.from, stanza[1]);
- send_s2s(attr.to, attr.from, format("<db:verify from='%s' to='%s' id='%s'>%s</db:verify>", attr.to, attr.from, origin.streamid, stanza[1]));
- hosts[attr.from].dialback_verifying = origin;
+ log("debug", "asking %s if key %s belongs to them", origin.from_host, origin.dialback_key);
+ send_s2s(origin.to_host, origin.from_host, format("<db:verify from='%s' to='%s' id='%s'>%s</db:verify>", origin.to_host, origin.from_host, origin.streamid, origin.dialback_key));
+ hosts[origin.from_host].dialback_verifying = origin;
end
end
elseif origin.type == "s2sout_unauthed" or origin.type == "s2sout" then