Software /
code /
prosody
Changeset
982:dbbeb73952e6
componentmanager: Improve default component stanza handler
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 11 Apr 2009 22:23:49 +0100 |
parents | 981:71fce47dff7b |
children | 983:460429a59c83 |
files | core/componentmanager.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/componentmanager.lua Sat Apr 11 22:22:24 2009 +0100 +++ b/core/componentmanager.lua Sat Apr 11 22:23:49 2009 +0100 @@ -14,6 +14,7 @@ local eventmanager = require "core.eventmanager"; local modulemanager = require "core.modulemanager"; local jid_split = require "util.jid".split; +local st = require "util.stanza"; local hosts = hosts; local pairs, type, tostring = pairs, type, tostring; @@ -35,7 +36,10 @@ module "componentmanager" local function default_component_handler(origin, stanza) - origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable")); + log("warn", "Stanza being handled by default component, bouncing error"); + if stanza.attr.type ~= "error" then + origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable")); + end end