diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-11-04 22:50:32 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-11-04 22:50:32 +0000 |
commit | fa5531fe41a1998d31360a4c28a72984247b0493 (patch) | |
tree | 70d4d3464aa786519681c09e398f12d30a1d8817 | |
parent | c25d2a02a8ddde231f34e4ae696ce8721dfc9b3f (diff) | |
download | prosody-fa5531fe41a1998d31360a4c28a72984247b0493.tar.gz prosody-fa5531fe41a1998d31360a4c28a72984247b0493.zip |
Re-applying my changes to componentmanager. Sigh.
-rw-r--r-- | core/componentmanager.lua | 6 |
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;
|