aboutsummaryrefslogtreecommitdiffstats
path: root/core/componentmanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-11-10 03:39:38 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-11-10 03:39:38 +0500
commit67804ef1a34cba2c42ccf8324ad8fef8c04ddc47 (patch)
treede1b3d70afcf956438ca47d200659334565ef6a9 /core/componentmanager.lua
parente75ae6d76d77c2337f3dadfe667ecd517dbbad36 (diff)
downloadprosody-67804ef1a34cba2c42ccf8324ad8fef8c04ddc47.tar.gz
prosody-67804ef1a34cba2c42ccf8324ad8fef8c04ddc47.zip
componentmanager, hostmanager, modulemanager, mod_component: Got rid of the useless hosts[*].connected property.
Diffstat (limited to 'core/componentmanager.lua')
-rw-r--r--core/componentmanager.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua
index f2f64a7d..39a5f7ef 100644
--- a/core/componentmanager.lua
+++ b/core/componentmanager.lua
@@ -40,7 +40,6 @@ function load_enabled_components(config)
for host, host_config in pairs(defined_hosts) do
if host ~= "*" and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then
hosts[host] = create_component(host);
- hosts[host].connected = false;
components[host] = default_component_handler;
local ok, err = modulemanager.load(host, host_config.core.component_module);
if not ok then
@@ -59,14 +58,14 @@ end
function create_component(host, component, events)
-- TODO check for host well-formedness
- return { type = "component", host = host, connected = true, s2sout = {},
+ return { type = "component", host = host, s2sout = {},
events = events or events_new(),
dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(),
disallow_s2s = configmanager.get(host, "core", "disallow_s2s"); };
end
function register_component(host, component)
- if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then
+ if not hosts[host] or hosts[host].type == 'component' then
local old_events = hosts[host] and hosts[host].events;
components[host] = component;
@@ -98,7 +97,6 @@ function deregister_component(host)
if components[host] then
modulemanager.unload(host, "tls");
modulemanager.unload(host, "dialback");
- hosts[host].connected = nil;
local host_config = configmanager.getconfig()[host];
if host_config and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then
-- Set default handler