From 6175b0f89e751a16adebdfd2a5b1f7152fe88b8a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 11 Apr 2009 23:15:04 +0100 Subject: componentmanager: Use core_route_stanza to reply in the default component --- core/componentmanager.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/componentmanager.lua') 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 -- cgit v1.2.3