aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/componentmanager.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua
index 18bf5c02..38718882 100644
--- a/core/componentmanager.lua
+++ b/core/componentmanager.lua
@@ -15,7 +15,7 @@ function handle_stanza(origin, stanza)
if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource
if component then
log("debug", "stanza being handled by component: "..host);
- component(origin, stanza);
+ component(origin, stanza, hosts[host]);
else
log("error", "Component manager recieved a stanza for a non-existing component: " .. stanza.attr.to);
end
@@ -25,11 +25,11 @@ function register_component(host, component)
if not hosts[host] then
-- TODO check for host well-formedness
components[host] = component;
- hosts[host] = {type = "component", connected = true};
+ hosts[host] = {type = "component", host = host, connected = true};
log("debug", "component added: "..host);
else
log("error", "Attempt to set component for existing host: "..host);
end
end
-return _M; \ No newline at end of file
+return _M;