From 32b1d54a24d043bff7f21baaf357b76f40015837 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 16 May 2009 01:41:45 +0500 Subject: stanza_router: Removed global function core_handle_stanza --- core/modulemanager.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'core/modulemanager.lua') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 6dbc8c53..e0d5ce9b 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -226,7 +226,14 @@ function handle_stanza(host, origin, stanza) (handlers[1])(origin, stanza); return true; else - log("debug", "Stanza unhandled by any modules, xmlns: %s", stanza.attr.xmlns); -- we didn't handle it + 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 + if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then + origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); + end + else + origin:close("unsupported-stanza-type"); + end end end -- cgit v1.2.3