From cc88d3d1fd9d3ee057da84a26cfeea08a663b2b9 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 10 Nov 2010 20:42:59 +0500 Subject: componentmanager: Removed get_children(host). --- core/componentmanager.lua | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/core/componentmanager.lua b/core/componentmanager.lua index fceddcc5..dfc2cd78 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -22,9 +22,6 @@ local pairs, setmetatable, type, tostring = pairs, setmetatable, type, tostring; local components = {}; -local disco_items = require "util.multitable".new(); -local NULL = {}; - module "componentmanager" local function default_component_handler(origin, stanza) @@ -58,10 +55,6 @@ function register_component(host, component) hosts[host].dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(); end - -- add to disco_items - if not(host:find("@", 1, true) or host:find("/", 1, true)) and host:find(".", 1, true) then - disco_items:set(host:sub(host:find(".", 1, true)+1), host, true); - end modulemanager.load(host, "dialback"); modulemanager.load(host, "tls"); log("debug", "component added: "..host); @@ -84,10 +77,6 @@ function deregister_component(host) hosts[host] = nil; -- FIXME do proper unload of all modules and other cleanup before removing components[host] = nil; end - -- remove from disco_items - if not(host:find("@", 1, true) or host:find("/", 1, true)) and host:find(".", 1, true) then - disco_items:remove(host:sub(host:find(".", 1, true)+1), host); - end log("debug", "component removed: "..host); return true; else @@ -95,8 +84,4 @@ function deregister_component(host) end end -function get_children(host) - return disco_items:get(host) or NULL; -end - return _M; -- cgit v1.2.3