aboutsummaryrefslogtreecommitdiffstats
path: root/core/componentmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-04-11 22:23:49 +0100
committerMatthew Wild <mwild1@gmail.com>2009-04-11 22:23:49 +0100
commitd3497ece79c81c9a2509407a50472856b8c72d0e (patch)
tree65075062457140991db0dba476e70605aa6f1c2a /core/componentmanager.lua
parent0ddf0a3232f175e8d160b54549bb4a1ff1afe63d (diff)
downloadprosody-d3497ece79c81c9a2509407a50472856b8c72d0e.tar.gz
prosody-d3497ece79c81c9a2509407a50472856b8c72d0e.zip
componentmanager: Improve default component stanza handler
Diffstat (limited to 'core/componentmanager.lua')
-rw-r--r--core/componentmanager.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua
index 1da8cd6f..6727c82e 100644
--- a/core/componentmanager.lua
+++ b/core/componentmanager.lua
@@ -14,6 +14,7 @@ local configmanager = require "core.configmanager";
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 @@ end);
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