componentmanager: Removed get_children(host).

Wed, 10 Nov 2010 20:42:59 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Wed, 10 Nov 2010 20:42:59 +0500
changeset 3602
a977d8be6277
parent 3601
829e23b374cc
child 3603
fdc671381411

componentmanager: Removed get_children(host).

core/componentmanager.lua file | annotate | diff | comparison | revisions
--- a/core/componentmanager.lua	Wed Nov 10 20:36:37 2010 +0500
+++ b/core/componentmanager.lua	Wed Nov 10 20:42:59 2010 +0500
@@ -22,9 +22,6 @@
 
 local components = {};
 
-local disco_items = require "util.multitable".new();
-local NULL = {};
-
 module "componentmanager"
 
 local function default_component_handler(origin, stanza)
@@ -58,10 +55,6 @@
 			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 @@
 			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 @@
 	end
 end
 
-function get_children(host)
-	return disco_items:get(host) or NULL;
-end
-
 return _M;

mercurial