aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-09 15:05:46 +0200
committerKim Alvefur <zash@zash.se>2014-09-09 15:05:46 +0200
commitccb4b3e4930cbcb860d80c4ed91e57cec36d2d30 (patch)
tree5bd9c8e96405049d9351ba61e790fcb30bb9a0e8
parentc298ff7fb454df9f575cf45c66ceca8341c47818 (diff)
downloadprosody-ccb4b3e4930cbcb860d80c4ed91e57cec36d2d30.tar.gz
prosody-ccb4b3e4930cbcb860d80c4ed91e57cec36d2d30.zip
core.stanza_router, mod_s2s: Move handling of S2S features to mod_s2s from stanza_router
-rw-r--r--core/stanza_router.lua2
-rw-r--r--plugins/mod_s2s/mod_s2s.lua1
2 files changed, 2 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index dbbb299b..4f529129 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -46,7 +46,7 @@ local function handle_unhandled_stanza(host, origin, stanza)
if origin.send then
origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
end
- elseif not((name == "features" or name == "error") and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features
+ else
log("warn", "Unhandled %s stream element or stanza: %s; xmlns=%s: %s", origin_type, name, xmlns, tostring(stanza)); -- we didn't handle it
origin:close("unsupported-stanza-type");
end
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 0a2b5bb7..7ff921d9 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -153,6 +153,7 @@ function module.add_host(module)
-- Stream is authenticated and we are seem to be done with feature negotiation,
-- so the stream is ready for stanzas. RFC 6120 Section 4.3
mark_connected(session);
+ return true;
end
end, -1);
end