aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-09-13 00:32:12 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-09-13 00:32:12 +0500
commitd05b3ab008de4b2a4f3f756d2a68eda95da074a3 (patch)
tree57d3d41468b9846ef35968f3d5713c866c9401cb /core
parentdb36af380f35608bfabfaf65c9c0b5ad387317f6 (diff)
downloadprosody-d05b3ab008de4b2a4f3f756d2a68eda95da074a3.tar.gz
prosody-d05b3ab008de4b2a4f3f756d2a68eda95da074a3.zip
hostmanager, modulemanager: Ensure hosts[*].modules always exists.
Diffstat (limited to 'core')
-rw-r--r--core/hostmanager.lua1
-rw-r--r--core/modulemanager.lua5
2 files changed, 2 insertions, 4 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua
index 3c90dbb9..cee4a1d6 100644
--- a/core/hostmanager.lua
+++ b/core/hostmanager.lua
@@ -75,6 +75,7 @@ function activate(host, host_config)
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 --git a/core/modulemanager.lua b/core/modulemanager.lua
index 9c5e4a4a..b0d54caa 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -119,10 +119,7 @@ local function do_load_module(host, module_name)
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