Software /
code /
prosody
Diff
core/modulemanager.lua @ 1167:5620ea24be94
stanza_router: Removed global function core_handle_stanza
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 16 May 2009 01:41:45 +0500 |
parent | 1105:965a55db3732 |
child | 1173:09a4cd461673 |
line wrap: on
line diff
--- a/core/modulemanager.lua Fri May 15 20:38:30 2009 +0100 +++ b/core/modulemanager.lua Sat May 16 01:41:45 2009 +0500 @@ -226,7 +226,14 @@ (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