core.stanza_router, mod_s2s: Move handling of S2S features to mod_s2s from stanza_router
authorKim Alvefur <zash@zash.se>
Tue, 9 Sep 2014 13:05:46 +0000 (15:05 +0200)
committerKim Alvefur <zash@zash.se>
Tue, 9 Sep 2014 13:05:46 +0000 (15:05 +0200)
core/stanza_router.lua
plugins/mod_s2s/mod_s2s.lua

index dbbb299b1d0752b21df390ebaca5df14d1aa85ae..4f529129d91ce121f261f696d554db17e2004acc 100644 (file)
@@ -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
index 0a2b5bb773bd08cad82ad808c58ce3f5d2af938a..7ff921d927dc415639fb7afc5295f97b0bdf9ea4 100644 (file)
@@ -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