modulemanager initializes hosts[host] if it isn't already initialized when loading a module.

Wed, 11 Feb 2009 17:57:48 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Wed, 11 Feb 2009 17:57:48 +0500
changeset 778
0d94b4903cc7
parent 777
f7a87acea220
child 779
ec0eadf4e9ff

modulemanager initializes hosts[host] if it isn't already initialized when loading a module.

core/modulemanager.lua file | annotate | diff | comparison | revisions
--- a/core/modulemanager.lua	Wed Feb 11 17:56:42 2009 +0500
+++ b/core/modulemanager.lua	Wed Feb 11 17:57:48 2009 +0500
@@ -112,6 +112,7 @@
 	local pluginenv = setmetatable({ module = api_instance }, { __index = _G });
 	
 	setfenv(mod, pluginenv);
+	if not hosts[host] then hosts[host] = { type = "component", host = host, connected = false, s2sout = {} }; end
 	
 	local success, ret = pcall(mod);
 	if not success then

mercurial