Stopped module loader from re-loading .dll once for every plugin found within it.

afrisby
Jeff Ames 2007-12-19 10:06:56 +00:00
parent cff2fb3640
commit 4314b6115b
1 changed files with 16 additions and 12 deletions

View File

@ -114,22 +114,28 @@ namespace OpenSim.Region.Environment
}
/// <summary>
/// Loads/initialises a Module instance that can be used by mutliple Regions
/// Loads/initialises a Module instance that can be used by multiple Regions
/// </summary>
/// <param name="dllName"></param>
/// <param name="moduleName"></param>
/// <param name="scene"></param>
public void LoadSharedModule(string dllName, string moduleName)
{
IRegionModule module = LoadModule(dllName, moduleName);
if (module != null)
LoadSharedModule(module);
}
/// <summary>
/// Loads/initialises a Module instance that can be used by multiple Regions
/// </summary>
/// <param name="module"></param>
public void LoadSharedModule(IRegionModule module)
{
if (!m_loadedSharedModules.ContainsKey(module.Name))
{
m_loadedSharedModules.Add(module.Name, module);
}
}
}
public void LoadRegionModules(string dllName, Scene scene)
{
@ -148,7 +154,7 @@ namespace OpenSim.Region.Environment
else
{
m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name);
LoadSharedModule(dllName, module.Name);
LoadSharedModule(module);
}
}
}
@ -168,7 +174,6 @@ namespace OpenSim.Region.Environment
/// </summary>
/// <param name="dllName"></param>
/// <param name="moduleName"></param>
/// <param name="scene"></param>
public IRegionModule LoadModule(string dllName, string moduleName)
{
IRegionModule[] modules = LoadModules(dllName);
@ -202,7 +207,6 @@ namespace OpenSim.Region.Environment
}
}
if (pluginAssembly != null)
{
try