diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-09-11 16:28:52 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-09-11 16:28:52 +0500 |
commit | 03ee32b763eaa384e829b25d9d58b29f98548774 (patch) | |
tree | be473b3237881ca559beedfd8c9d5e0329c2ecd2 /core | |
parent | 47f75e2f54d91c1794faccea6ee70404e59b54d2 (diff) | |
download | prosody-03ee32b763eaa384e829b25d9d58b29f98548774.tar.gz prosody-03ee32b763eaa384e829b25d9d58b29f98548774.zip |
ComponentManager: Removed dependency on core_route_stanza. The default component handler now replies using origin.send().
Diffstat (limited to 'core')
-rw-r--r-- | core/componentmanager.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua index 3add43ec..c6cad234 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -10,7 +10,6 @@ local prosody = prosody; local log = require "util.logger".init("componentmanager"); local configmanager = require "core.configmanager"; local modulemanager = require "core.modulemanager"; -local core_route_stanza = core_route_stanza; local jid_split = require "util.jid".split; local events_new = require "util.events".new; local st = require "util.stanza"; @@ -23,14 +22,12 @@ local components = {}; local disco_items = require "util.multitable".new(); local NULL = {}; -prosody.events.add_handler("server-starting", function () core_route_stanza = _G.core_route_stanza; end); - module "componentmanager" local function default_component_handler(origin, stanza) log("warn", "Stanza being handled by default component, bouncing error"); if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then - core_route_stanza(nil, st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable")); + origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable")); end end |