Software /
code /
prosody
Comparison
core/modulemanager.lua @ 769:9e76018c62fa
Fix for never checking if the first module for a host is already loaded (affects global modules)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 04 Feb 2009 18:53:23 +0000 |
parent | 760:90ce865eebd8 |
child | 778:0d94b4903cc7 |
comparison
equal
deleted
inserted
replaced
768:a5195e3b0e44 | 769:9e76018c62fa |
---|---|
88 return nil, "insufficient-parameters"; | 88 return nil, "insufficient-parameters"; |
89 end | 89 end |
90 | 90 |
91 if not modulemap[host] then | 91 if not modulemap[host] then |
92 modulemap[host] = {}; | 92 modulemap[host] = {}; |
93 elseif modulemap[host][module_name] then | 93 end |
94 | |
95 if modulemap[host][module_name] then | |
94 log("warn", "%s is already loaded for %s, so not loading again", module_name, host); | 96 log("warn", "%s is already loaded for %s, so not loading again", module_name, host); |
95 return nil, "module-already-loaded"; | 97 return nil, "module-already-loaded"; |
96 elseif modulemap["*"][module_name] then | 98 elseif modulemap["*"][module_name] then |
97 return nil, "global-module-already-loaded"; | 99 return nil, "global-module-already-loaded"; |
98 end | 100 end |