diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/ModuleLoader.cs | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index 6893e3f..cfe19cb 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs | |||
@@ -114,20 +114,26 @@ namespace OpenSim.Region.Environment | |||
114 | } | 114 | } |
115 | 115 | ||
116 | /// <summary> | 116 | /// <summary> |
117 | /// Loads/initialises a Module instance that can be used by mutliple Regions | 117 | /// Loads/initialises a Module instance that can be used by multiple Regions |
118 | /// </summary> | 118 | /// </summary> |
119 | /// <param name="dllName"></param> | 119 | /// <param name="dllName"></param> |
120 | /// <param name="moduleName"></param> | 120 | /// <param name="moduleName"></param> |
121 | /// <param name="scene"></param> | ||
122 | public void LoadSharedModule(string dllName, string moduleName) | 121 | public void LoadSharedModule(string dllName, string moduleName) |
123 | { | 122 | { |
124 | IRegionModule module = LoadModule(dllName, moduleName); | 123 | IRegionModule module = LoadModule(dllName, moduleName); |
125 | if (module != null) | 124 | |
125 | LoadSharedModule(module); | ||
126 | } | ||
127 | |||
128 | /// <summary> | ||
129 | /// Loads/initialises a Module instance that can be used by multiple Regions | ||
130 | /// </summary> | ||
131 | /// <param name="module"></param> | ||
132 | public void LoadSharedModule(IRegionModule module) | ||
133 | { | ||
134 | if (!m_loadedSharedModules.ContainsKey(module.Name)) | ||
126 | { | 135 | { |
127 | if (!m_loadedSharedModules.ContainsKey(module.Name)) | 136 | m_loadedSharedModules.Add(module.Name, module); |
128 | { | ||
129 | m_loadedSharedModules.Add(module.Name, module); | ||
130 | } | ||
131 | } | 137 | } |
132 | } | 138 | } |
133 | 139 | ||
@@ -148,7 +154,7 @@ namespace OpenSim.Region.Environment | |||
148 | else | 154 | else |
149 | { | 155 | { |
150 | m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name); | 156 | m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name); |
151 | LoadSharedModule(dllName, module.Name); | 157 | LoadSharedModule(module); |
152 | } | 158 | } |
153 | } | 159 | } |
154 | } | 160 | } |
@@ -168,7 +174,6 @@ namespace OpenSim.Region.Environment | |||
168 | /// </summary> | 174 | /// </summary> |
169 | /// <param name="dllName"></param> | 175 | /// <param name="dllName"></param> |
170 | /// <param name="moduleName"></param> | 176 | /// <param name="moduleName"></param> |
171 | /// <param name="scene"></param> | ||
172 | public IRegionModule LoadModule(string dllName, string moduleName) | 177 | public IRegionModule LoadModule(string dllName, string moduleName) |
173 | { | 178 | { |
174 | IRegionModule[] modules = LoadModules(dllName); | 179 | IRegionModule[] modules = LoadModules(dllName); |
@@ -202,7 +207,6 @@ namespace OpenSim.Region.Environment | |||
202 | } | 207 | } |
203 | } | 208 | } |
204 | 209 | ||
205 | |||
206 | if (pluginAssembly != null) | 210 | if (pluginAssembly != null) |
207 | { | 211 | { |
208 | try | 212 | try |
@@ -221,9 +225,9 @@ namespace OpenSim.Region.Environment | |||
221 | } | 225 | } |
222 | } | 226 | } |
223 | } | 227 | } |
224 | catch( ReflectionTypeLoadException ) | 228 | catch (ReflectionTypeLoadException) |
225 | { | 229 | { |
226 | m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName ); | 230 | m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName); |
227 | } | 231 | } |
228 | } | 232 | } |
229 | 233 | ||