aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-04-11 23:15:04 +0100
committerMatthew Wild <mwild1@gmail.com>2009-04-11 23:15:04 +0100
commit6175b0f89e751a16adebdfd2a5b1f7152fe88b8a (patch)
tree6c76055546239a29d47baba254185c72802f67ed /core
parente9441f6999f144cb1c4ff21dad58cf612257d35c (diff)
downloadprosody-6175b0f89e751a16adebdfd2a5b1f7152fe88b8a.tar.gz
prosody-6175b0f89e751a16adebdfd2a5b1f7152fe88b8a.zip
componentmanager: Use core_route_stanza to reply in the default component
Diffstat (limited to 'core')
-rw-r--r--core/componentmanager.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua
index a6b253db..c7d9407c 100644
--- a/core/componentmanager.lua
+++ b/core/componentmanager.lua
@@ -13,6 +13,7 @@ local log = require "util.logger".init("componentmanager");
local configmanager = require "core.configmanager";
local eventmanager = require "core.eventmanager";
local modulemanager = require "core.modulemanager";
+local core_route_stanza = core_route_stanza;
local jid_split = require "util.jid".split;
local st = require "util.stanza";
local hosts = hosts;
@@ -38,7 +39,7 @@ module "componentmanager"
local function default_component_handler(origin, stanza)
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"));
+ core_route_stanza(nil, st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable"));
end
end
@@ -78,7 +79,7 @@ end
function create_component(host, component)
-- TODO check for host well-formedness
- local session = session or { type = "component", host = host, connected = true, s2sout = {}, send = component };
+ local session = session or { type = "component", host = host, connected = true, s2sout = {} };
return session;
end