Changeset

6403:166d1bd8fc38

core.stanza_router, mod_s2s: Move handling of S2S features to mod_s2s from stanza_router
author Kim Alvefur <zash@zash.se>
date Tue, 09 Sep 2014 15:05:46 +0200
parents 6402:b058486e6a79
children 6404:938cc782c14d
files core/stanza_router.lua plugins/mod_s2s/mod_s2s.lua
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/stanza_router.lua	Tue Sep 09 14:42:33 2014 +0200
+++ b/core/stanza_router.lua	Tue Sep 09 15:05:46 2014 +0200
@@ -46,7 +46,7 @@
 		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
--- a/plugins/mod_s2s/mod_s2s.lua	Tue Sep 09 14:42:33 2014 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Tue Sep 09 15:05:46 2014 +0200
@@ -153,6 +153,7 @@
 			-- 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