# HG changeset patch # User Matthew Wild # Date 1225839032 0 # Node ID d522f3a25ddaa73dc571a5c77059bb249818424d # Parent 35f626e29fb0650752cf64dd8a40e3f4a693c060 Re-applying my changes to componentmanager. Sigh. diff -r 35f626e29fb0 -r d522f3a25dda core/componentmanager.lua --- a/core/componentmanager.lua Wed Nov 05 03:47:22 2008 +0500 +++ b/core/componentmanager.lua Tue Nov 04 22:50:32 2008 +0000 @@ -15,7 +15,7 @@ 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 @@ 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;