diff options
author | Melanie | 2014-03-22 01:47:48 +0000 |
---|---|---|
committer | Melanie | 2014-03-22 01:47:48 +0000 |
commit | a4d322dcd1d7f7796180d63b9d9f7405332577c7 (patch) | |
tree | 77eaf262b38b383c8ab87f5924859ba2398740ad /OpenSim/Region/Application/OpenSimBase.cs | |
parent | Allow Mono Plugin Registry setting for Regions (diff) | |
download | opensim-SC-a4d322dcd1d7f7796180d63b9d9f7405332577c7.zip opensim-SC-a4d322dcd1d7f7796180d63b9d9f7405332577c7.tar.gz opensim-SC-a4d322dcd1d7f7796180d63b9d9f7405332577c7.tar.bz2 opensim-SC-a4d322dcd1d7f7796180d63b9d9f7405332577c7.tar.xz |
Allow the setting from the environment to take effect if no explicit setting is given.
This is done by calling the constructor only with a directory if one is actually given.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 8a27967..9d36986 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -159,12 +159,26 @@ namespace OpenSim | |||
159 | protected virtual void LoadPlugins() | 159 | protected virtual void LoadPlugins() |
160 | { | 160 | { |
161 | IConfig startupConfig = Config.Configs["Startup"]; | 161 | IConfig startupConfig = Config.Configs["Startup"]; |
162 | string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation",".") : "."; | 162 | string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation", String.Empty) : String.Empty; |
163 | 163 | ||
164 | using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation)) | 164 | // The location can also be specified in the environment. If there |
165 | // is no location in the configuration, we must call the constructor | ||
166 | // without a location parameter to allow that to happen. | ||
167 | if (registryLocation == String.Empty) | ||
165 | { | 168 | { |
166 | loader.Load("/OpenSim/Startup"); | 169 | using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this))) |
167 | m_plugins = loader.Plugins; | 170 | { |
171 | loader.Load("/OpenSim/Startup"); | ||
172 | m_plugins = loader.Plugins; | ||
173 | } | ||
174 | } | ||
175 | else | ||
176 | { | ||
177 | using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation)) | ||
178 | { | ||
179 | loader.Load("/OpenSim/Startup"); | ||
180 | m_plugins = loader.Plugins; | ||
181 | } | ||
168 | } | 182 | } |
169 | } | 183 | } |
170 | 184 | ||
@@ -1052,4 +1066,4 @@ namespace OpenSim | |||
1052 | { | 1066 | { |
1053 | public IConfigSource Source; | 1067 | public IConfigSource Source; |
1054 | } | 1068 | } |
1055 | } \ No newline at end of file | 1069 | } |