From 9ff673912fe98fee29125ed928d254dd1abae20b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 6 Oct 2009 23:14:01 +0100 Subject: modulemanager: Bump log level of unhandled non-default-namespace elements, and log their full XML --- core/modulemanager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 0b5f0351..383b9d37 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -247,12 +247,13 @@ function handle_stanza(host, origin, stanza) (handlers[1])(origin, stanza); return true; else - log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it if stanza.attr.xmlns == "jabber:client" then + log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" 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 + log("warn", "Unhandled %s stream element: %s; xmlns=%s: %s", origin.type, stanza.name, xmlns, tostring(stanza)); -- we didn't handle it origin:close("unsupported-stanza-type"); end end -- cgit v1.2.3