Software /
code /
prosody
Diff
core/componentmanager.lua @ 985:2ecd38c73b50
componentmanager: Use core_route_stanza to reply in the default component
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 11 Apr 2009 23:15:04 +0100 |
parent | 984:9acc1c2ceb2c |
child | 986:ebd94ad97b75 |
line wrap: on
line diff
--- a/core/componentmanager.lua Sat Apr 11 22:25:32 2009 +0100 +++ b/core/componentmanager.lua Sat Apr 11 23:15:04 2009 +0100 @@ -13,6 +13,7 @@ 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 @@ 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 @@ 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