Fix for never checking if the first module for a host is already loaded (affects...
authorMatthew Wild <mwild1@gmail.com>
Wed, 4 Feb 2009 18:53:23 +0000 (18:53 +0000)
committerMatthew Wild <mwild1@gmail.com>
Wed, 4 Feb 2009 18:53:23 +0000 (18:53 +0000)
core/modulemanager.lua

index b7158e31f9237f60be2ad9c5bb0390121c4abcdc..12cf9ce8c6eb78131ef98fb0f733b69dc309a656 100644 (file)
@@ -90,7 +90,9 @@ function load(host, module_name, config)
        
        if not modulemap[host] then
                modulemap[host] = {};
-       elseif modulemap[host][module_name] then
+       end
+       
+       if modulemap[host][module_name] then
                log("warn", "%s is already loaded for %s, so not loading again", module_name, host);
                return nil, "module-already-loaded";
        elseif modulemap["*"][module_name] then