Software /
code /
prosody
Comparison
core/componentmanager.lua @ 270:837c7f701a56
Return registered host table when registering a component
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 15 Nov 2008 04:28:41 +0000 |
parent | 261:790cf21e2af7 |
child | 519:cccd610a0ef9 |
comparison
equal
deleted
inserted
replaced
269:3cfac0e5e6ca | 270:837c7f701a56 |
---|---|
25 if not hosts[host] then | 25 if not hosts[host] then |
26 -- TODO check for host well-formedness | 26 -- TODO check for host well-formedness |
27 components[host] = component; | 27 components[host] = component; |
28 hosts[host] = {type = "component", host = host, connected = true, s2sout = {} }; | 28 hosts[host] = {type = "component", host = host, connected = true, s2sout = {} }; |
29 log("debug", "component added: "..host); | 29 log("debug", "component added: "..host); |
30 return hosts[host]; | |
30 else | 31 else |
31 log("error", "Attempt to set component for existing host: "..host); | 32 log("error", "Attempt to set component for existing host: "..host); |
32 end | 33 end |
33 end | 34 end |
34 | 35 |