# HG changeset patch # User Waqas Hussain # Date 1224692429 -18000 # Node ID 0abe771b43c68994e1a0d6ad1b938191f26e4cf4 # Parent bb5ac5976a976df238199f2a8ba5d3ece03e71c8 Fixed: Unhandled stanza handling diff -r bb5ac5976a97 -r 0abe771b43c6 core/servermanager.lua --- a/core/servermanager.lua Wed Oct 22 21:20:07 2008 +0500 +++ b/core/servermanager.lua Wed Oct 22 21:20:29 2008 +0500 @@ -10,11 +10,13 @@ -- Use plugins if not modulemanager.handle_stanza(origin, stanza) then if stanza.name == "iq" then - local reply = st.reply(stanza); - reply.attr.type = "error"; - reply:tag("error", { type = "cancel" }) - :tag("service-unavailable", { xmlns = xmlns_stanzas }); - send(origin, reply); + if stanza.attr.type ~= "result" and stanza.attr.type ~= "error" then + send(origin, st.error_reply(stanza, "cancel", "service-unavailable")); + end + elseif stanza.name == "message" then + send(origin, st.error_reply(stanza, "cancel", "service-unavailable")); + elseif stanza.name ~= "presence" then + error("Unknown stanza"); end end end