# HG changeset patch # User Waqas Hussain # Date 1347478332 -18000 # Node ID 7c5c86fa552e614a03cff8cc26150556cd71e728 # Parent b41c33dc7c36f182b635b4dd2ad818a56ad4f636 hostmanager, modulemanager: Ensure hosts[*].modules always exists. diff -r b41c33dc7c36 -r 7c5c86fa552e core/hostmanager.lua --- a/core/hostmanager.lua Wed Sep 12 23:46:10 2012 +0500 +++ b/core/hostmanager.lua Thu Sep 13 00:32:12 2012 +0500 @@ -75,6 +75,7 @@ events = events_new(); dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(); send = host_send; + modules = {}; }; if not host_config.core.component_module then -- host host_session.type = "local"; diff -r b41c33dc7c36 -r 7c5c86fa552e core/modulemanager.lua --- a/core/modulemanager.lua Wed Sep 12 23:46:10 2012 +0500 +++ b/core/modulemanager.lua Thu Sep 13 00:32:12 2012 +0500 @@ -119,10 +119,7 @@ end if not modulemap[host] then - modulemap[host] = {}; - if host ~= "*" then - hosts[host].modules = modulemap[host]; - end + modulemap[host] = hosts[host].modules; end if modulemap[host][module_name] then