componentmanager: Removed an unused third parameter from the register_component function.
authorWaqas Hussain <waqas20@gmail.com>
Tue, 02 Nov 2010 04:29:54 +0500
changeset 3547 3242e70f1058
parent 3546 cb1600dea3ad
child 3548 cd8d1cacc65b
componentmanager: Removed an unused third parameter from the register_component function.
core/componentmanager.lua
--- a/core/componentmanager.lua	Sun Oct 24 15:08:22 2010 +0500
+++ b/core/componentmanager.lua	Tue Nov 02 04:29:54 2010 +0500
@@ -98,12 +98,12 @@
 			disallow_s2s = configmanager.get(host, "core", "disallow_s2s"); };
 end
 
-function register_component(host, component, session)
+function register_component(host, component)
 	if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then
 		local old_events = hosts[host] and hosts[host].events;
 
 		components[host] = component;
-		hosts[host] = session or create_component(host, component, old_events);
+		hosts[host] = create_component(host, component, old_events);
 
 		-- Add events object if not already one
 		if not hosts[host].events then
@@ -121,7 +121,7 @@
 		modulemanager.load(host, "dialback");
 		modulemanager.load(host, "tls");
 		log("debug", "component added: "..host);
-		return session or hosts[host];
+		return hosts[host];
 	else
 		log("error", "Attempt to set component for existing host: "..host);
 	end