diff options
author | MW | 2008-06-26 17:23:05 +0000 |
---|---|---|
committer | MW | 2008-06-26 17:23:05 +0000 |
commit | 314181a70d00d99506d3752653f1b0b87512ea44 (patch) | |
tree | b1d048f6635209506642256c082004981e1585e2 | |
parent | As per the suggestion on the mailing list, added support for a OpenSim.xml co... (diff) | |
download | opensim-SC-314181a70d00d99506d3752653f1b0b87512ea44.zip opensim-SC-314181a70d00d99506d3752653f1b0b87512ea44.tar.gz opensim-SC-314181a70d00d99506d3752653f1b0b87512ea44.tar.bz2 opensim-SC-314181a70d00d99506d3752653f1b0b87512ea44.tar.xz |
small change to last commit
7 files changed, 38 insertions, 38 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 01ea3eb..4b11fd4 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
51 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); | 51 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); |
52 | 52 | ||
53 | IRegionLoader regionLoader; | 53 | IRegionLoader regionLoader; |
54 | if (openSim.ConfigSource.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") | 54 | if (openSim.ConfigSource.Source.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") |
55 | { | 55 | { |
56 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); | 56 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); |
57 | regionLoader = new RegionLoaderFileSystem(); | 57 | regionLoader = new RegionLoaderFileSystem(); |
@@ -62,7 +62,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
62 | regionLoader = new RegionLoaderWebServer(); | 62 | regionLoader = new RegionLoaderWebServer(); |
63 | } | 63 | } |
64 | 64 | ||
65 | regionLoader.SetIniConfigSource(openSim.ConfigSource.ConfigSource); | 65 | regionLoader.SetIniConfigSource(openSim.ConfigSource.Source); |
66 | RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); | 66 | RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); |
67 | 67 | ||
68 | openSim.ModuleLoader.LoadDefaultSharedModules(); | 68 | openSim.ModuleLoader.LoadDefaultSharedModules(); |
@@ -89,7 +89,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
89 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); | 89 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); |
90 | 90 | ||
91 | IRegionLoader regionLoader; | 91 | IRegionLoader regionLoader; |
92 | if (openSim.ConfigSource.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") | 92 | if (openSim.ConfigSource.Source.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") |
93 | { | 93 | { |
94 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); | 94 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); |
95 | regionLoader = new RegionLoaderFileSystem(); | 95 | regionLoader = new RegionLoaderFileSystem(); |
@@ -100,7 +100,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
100 | regionLoader = new RegionLoaderWebServer(); | 100 | regionLoader = new RegionLoaderWebServer(); |
101 | } | 101 | } |
102 | 102 | ||
103 | regionLoader.SetIniConfigSource(openSim.ConfigSource.ConfigSource); | 103 | regionLoader.SetIniConfigSource(openSim.ConfigSource.Source); |
104 | RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); | 104 | RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); |
105 | for (int i = 0; i < regionsToLoad.Length; i++) | 105 | for (int i = 0; i < regionsToLoad.Length; i++) |
106 | { | 106 | { |
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 947f833..5063375 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -58,11 +58,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
58 | { | 58 | { |
59 | try | 59 | try |
60 | { | 60 | { |
61 | if (openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"] != null && | 61 | if (openSim.ConfigSource.Source.Configs["RemoteAdmin"] != null && |
62 | openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) | 62 | openSim.ConfigSource.Source.Configs["RemoteAdmin"].GetBoolean("enabled", false)) |
63 | { | 63 | { |
64 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); | 64 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); |
65 | requiredPassword = openSim.ConfigSource.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty); | 65 | requiredPassword = openSim.ConfigSource.Source.Configs["RemoteAdmin"].GetString("access_password", String.Empty); |
66 | 66 | ||
67 | m_app = openSim; | 67 | m_app = openSim; |
68 | m_httpd = openSim.HttpServer; | 68 | m_httpd = openSim.HttpServer; |
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs index 60a7d27..4558d4d 100644 --- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs | |||
@@ -203,7 +203,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
203 | 203 | ||
204 | try | 204 | try |
205 | { | 205 | { |
206 | if ((_config = openSim.ConfigSource.ConfigSource.Configs["RestPlugins"]) == null) | 206 | if ((_config = openSim.ConfigSource.Source.Configs["RestPlugins"]) == null) |
207 | { | 207 | { |
208 | m_log.WarnFormat("{0} Rest Plugins not configured", MsgID); | 208 | m_log.WarnFormat("{0} Rest Plugins not configured", MsgID); |
209 | return; | 209 | return; |
@@ -225,7 +225,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
225 | _prefix = _config.GetString("prefix", "/admin"); | 225 | _prefix = _config.GetString("prefix", "/admin"); |
226 | 226 | ||
227 | // Get plugin specific config | 227 | // Get plugin specific config |
228 | _pluginConfig = openSim.ConfigSource.ConfigSource.Configs[ConfigName]; | 228 | _pluginConfig = openSim.ConfigSource.Source.Configs[ConfigName]; |
229 | 229 | ||
230 | 230 | ||
231 | m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); | 231 | m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 4738dfc..8b42e2e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim | |||
69 | 69 | ||
70 | protected override void ReadConfigSettings() | 70 | protected override void ReadConfigSettings() |
71 | { | 71 | { |
72 | IConfig startupConfig = m_config.ConfigSource.Configs["Startup"]; | 72 | IConfig startupConfig = m_config.Source.Configs["Startup"]; |
73 | 73 | ||
74 | if (startupConfig != null) | 74 | if (startupConfig != null) |
75 | { | 75 | { |
@@ -528,7 +528,7 @@ namespace OpenSim | |||
528 | c = DefaultConfig().AddConfig(cmdparams[1]); | 528 | c = DefaultConfig().AddConfig(cmdparams[1]); |
529 | string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3); | 529 | string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3); |
530 | c.Set(cmdparams[2], _value); | 530 | c.Set(cmdparams[2], _value); |
531 | m_config.ConfigSource.Merge(c.ConfigSource); | 531 | m_config.Source.Merge(c.ConfigSource); |
532 | 532 | ||
533 | m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + | 533 | m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + |
534 | _value); | 534 | _value); |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 255a125..49e1da3 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -170,22 +170,22 @@ namespace OpenSim | |||
170 | Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); | 170 | Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); |
171 | 171 | ||
172 | m_config = new OpenSimConfigSource(); | 172 | m_config = new OpenSimConfigSource(); |
173 | m_config.ConfigSource = new IniConfigSource(); | 173 | m_config.Source = new IniConfigSource(); |
174 | IConfigSource icong; | 174 | IConfigSource icong; |
175 | 175 | ||
176 | //check for .INI file (either default or name passed in command line) | 176 | //check for .INI file (either default or name passed in command line) |
177 | if (File.Exists(Application.iniFilePath)) | 177 | if (File.Exists(Application.iniFilePath)) |
178 | { | 178 | { |
179 | m_config.ConfigSource.Merge(new IniConfigSource(Application.iniFilePath)); | 179 | m_config.Source.Merge(new IniConfigSource(Application.iniFilePath)); |
180 | m_config.ConfigSource.Merge(configSource); | 180 | m_config.Source.Merge(configSource); |
181 | } | 181 | } |
182 | else | 182 | else |
183 | { | 183 | { |
184 | Application.iniFilePath = Path.Combine(Util.configDir(), Application.iniFilePath); | 184 | Application.iniFilePath = Path.Combine(Util.configDir(), Application.iniFilePath); |
185 | if (File.Exists(Application.iniFilePath)) | 185 | if (File.Exists(Application.iniFilePath)) |
186 | { | 186 | { |
187 | m_config.ConfigSource.Merge(new IniConfigSource(Application.iniFilePath)); | 187 | m_config.Source.Merge(new IniConfigSource(Application.iniFilePath)); |
188 | m_config.ConfigSource.Merge(configSource); | 188 | m_config.Source.Merge(configSource); |
189 | } | 189 | } |
190 | else | 190 | else |
191 | { | 191 | { |
@@ -193,17 +193,17 @@ namespace OpenSim | |||
193 | { | 193 | { |
194 | //chech for a xml config file | 194 | //chech for a xml config file |
195 | Application.iniFilePath = "OpenSim.xml"; | 195 | Application.iniFilePath = "OpenSim.xml"; |
196 | m_config.ConfigSource = new XmlConfigSource(); | 196 | m_config.Source = new XmlConfigSource(); |
197 | m_config.ConfigSource.Merge(new XmlConfigSource(Application.iniFilePath)); | 197 | m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath)); |
198 | m_config.ConfigSource.Merge(configSource); | 198 | m_config.Source.Merge(configSource); |
199 | } | 199 | } |
200 | else | 200 | else |
201 | { | 201 | { |
202 | //Application.iniFilePath = "OpenSim.xml"; | 202 | //Application.iniFilePath = "OpenSim.xml"; |
203 | // m_config.ConfigSource = new XmlConfigSource(); | 203 | // m_config.ConfigSource = new XmlConfigSource(); |
204 | // no default config files, so set default values, and save it | 204 | // no default config files, so set default values, and save it |
205 | m_config.ConfigSource.Merge(DefaultConfig()); | 205 | m_config.Source.Merge(DefaultConfig()); |
206 | m_config.ConfigSource.Merge(configSource); | 206 | m_config.Source.Merge(configSource); |
207 | m_config.Save(Application.iniFilePath); | 207 | m_config.Save(Application.iniFilePath); |
208 | } | 208 | } |
209 | } | 209 | } |
@@ -294,7 +294,7 @@ namespace OpenSim | |||
294 | { | 294 | { |
295 | m_networkServersInfo = new NetworkServersInfo(); | 295 | m_networkServersInfo = new NetworkServersInfo(); |
296 | 296 | ||
297 | IConfig startupConfig = m_config.ConfigSource.Configs["Startup"]; | 297 | IConfig startupConfig = m_config.Source.Configs["Startup"]; |
298 | 298 | ||
299 | if (startupConfig != null) | 299 | if (startupConfig != null) |
300 | { | 300 | { |
@@ -323,7 +323,7 @@ namespace OpenSim | |||
323 | m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); | 323 | m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); |
324 | } | 324 | } |
325 | 325 | ||
326 | IConfig standaloneConfig = m_config.ConfigSource.Configs["StandAlone"]; | 326 | IConfig standaloneConfig = m_config.Source.Configs["StandAlone"]; |
327 | if (standaloneConfig != null) | 327 | if (standaloneConfig != null) |
328 | { | 328 | { |
329 | m_standaloneAuthenticate = standaloneConfig.GetBoolean("accounts_authenticate", false); | 329 | m_standaloneAuthenticate = standaloneConfig.GetBoolean("accounts_authenticate", false); |
@@ -344,7 +344,7 @@ namespace OpenSim | |||
344 | m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); | 344 | m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); |
345 | } | 345 | } |
346 | 346 | ||
347 | m_networkServersInfo.loadFromConfiguration(m_config.ConfigSource); | 347 | m_networkServersInfo.loadFromConfiguration(m_config.Source); |
348 | } | 348 | } |
349 | 349 | ||
350 | /// <summary> | 350 | /// <summary> |
@@ -397,11 +397,11 @@ namespace OpenSim | |||
397 | m_httpServer.AddStreamHandler(new SimStatusHandler()); | 397 | m_httpServer.AddStreamHandler(new SimStatusHandler()); |
398 | } | 398 | } |
399 | 399 | ||
400 | proxyUrl = ConfigSource.ConfigSource.Configs["Network"].GetString("proxy_url", ""); | 400 | proxyUrl = ConfigSource.Source.Configs["Network"].GetString("proxy_url", ""); |
401 | proxyOffset = Int32.Parse(ConfigSource.ConfigSource.Configs["Network"].GetString("proxy_offset", "0")); | 401 | proxyOffset = Int32.Parse(ConfigSource.Source.Configs["Network"].GetString("proxy_offset", "0")); |
402 | 402 | ||
403 | // Create a ModuleLoader instance | 403 | // Create a ModuleLoader instance |
404 | m_moduleLoader = new ModuleLoader(m_config.ConfigSource); | 404 | m_moduleLoader = new ModuleLoader(m_config.Source); |
405 | 405 | ||
406 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); | 406 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); |
407 | foreach (TypeExtensionNode node in nodes) | 407 | foreach (TypeExtensionNode node in nodes) |
@@ -586,7 +586,7 @@ namespace OpenSim | |||
586 | return | 586 | return |
587 | new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, | 587 | new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, |
588 | storageManager, m_httpServer, | 588 | storageManager, m_httpServer, |
589 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config.ConfigSource, | 589 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config.Source, |
590 | m_version); | 590 | m_version); |
591 | 591 | ||
592 | } | 592 | } |
@@ -635,7 +635,7 @@ namespace OpenSim | |||
635 | 635 | ||
636 | protected override PhysicsScene GetPhysicsScene() | 636 | protected override PhysicsScene GetPhysicsScene() |
637 | { | 637 | { |
638 | return GetPhysicsScene(m_physicsEngine, m_meshEngineName, m_config.ConfigSource); | 638 | return GetPhysicsScene(m_physicsEngine, m_meshEngineName, m_config.Source); |
639 | } | 639 | } |
640 | 640 | ||
641 | /// <summary> | 641 | /// <summary> |
@@ -722,18 +722,18 @@ namespace OpenSim | |||
722 | 722 | ||
723 | public class OpenSimConfigSource | 723 | public class OpenSimConfigSource |
724 | { | 724 | { |
725 | public IConfigSource ConfigSource; | 725 | public IConfigSource Source; |
726 | 726 | ||
727 | public void Save(string path) | 727 | public void Save(string path) |
728 | { | 728 | { |
729 | if (ConfigSource is IniConfigSource) | 729 | if (Source is IniConfigSource) |
730 | { | 730 | { |
731 | IniConfigSource iniCon = (IniConfigSource)ConfigSource; | 731 | IniConfigSource iniCon = (IniConfigSource)Source; |
732 | iniCon.Save(path); | 732 | iniCon.Save(path); |
733 | } | 733 | } |
734 | else if (ConfigSource is XmlConfigSource) | 734 | else if (Source is XmlConfigSource) |
735 | { | 735 | { |
736 | XmlConfigSource xmlCon = (XmlConfigSource)ConfigSource; | 736 | XmlConfigSource xmlCon = (XmlConfigSource)Source; |
737 | xmlCon.Save(path); | 737 | xmlCon.Save(path); |
738 | } | 738 | } |
739 | } | 739 | } |
diff --git a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs index e22231c..2aa2398 100644 --- a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs +++ b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
79 | { | 79 | { |
80 | m_log.Info("[BALANCER] " + "Entering Initialize()"); | 80 | m_log.Info("[BALANCER] " + "Entering Initialize()"); |
81 | 81 | ||
82 | proxyURL = openSim.ConfigSource.ConfigSource.Configs["Network"].GetString("proxy_url", ""); | 82 | proxyURL = openSim.ConfigSource.Source.Configs["Network"].GetString("proxy_url", ""); |
83 | if (proxyURL.Length == 0) return; | 83 | if (proxyURL.Length == 0) return; |
84 | 84 | ||
85 | StartTcpServer(); | 85 | StartTcpServer(); |
@@ -93,8 +93,8 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
93 | simMain = openSim; | 93 | simMain = openSim; |
94 | commandServer = openSim.HttpServer; | 94 | commandServer = openSim.HttpServer; |
95 | 95 | ||
96 | proxyOffset = Int32.Parse(openSim.ConfigSource.ConfigSource.Configs["Network"].GetString("proxy_offset", "0")); | 96 | proxyOffset = Int32.Parse(openSim.ConfigSource.Source.Configs["Network"].GetString("proxy_offset", "0")); |
97 | serializeDir = openSim.ConfigSource.ConfigSource.Configs["Network"].GetString("serialize_dir", "/tmp/"); | 97 | serializeDir = openSim.ConfigSource.Source.Configs["Network"].GetString("serialize_dir", "/tmp/"); |
98 | 98 | ||
99 | commandServer.AddXmlRPCHandler("SerializeRegion", SerializeRegion); | 99 | commandServer.AddXmlRPCHandler("SerializeRegion", SerializeRegion); |
100 | commandServer.AddXmlRPCHandler("DeserializeRegion_Move", DeserializeRegion_Move); | 100 | commandServer.AddXmlRPCHandler("DeserializeRegion_Move", DeserializeRegion_Move); |
diff --git a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs index d8376b4..9bb883e 100644 --- a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs +++ b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
72 | public void Initialise(OpenSimBase openSim) | 72 | public void Initialise(OpenSimBase openSim) |
73 | { | 73 | { |
74 | m_log.Info("Starting proxy"); | 74 | m_log.Info("Starting proxy"); |
75 | string proxyURL = openSim.ConfigSource.ConfigSource.Configs["Network"].GetString("proxy_url", ""); | 75 | string proxyURL = openSim.ConfigSource.Source.Configs["Network"].GetString("proxy_url", ""); |
76 | if (proxyURL.Length == 0) return; | 76 | if (proxyURL.Length == 0) return; |
77 | 77 | ||
78 | uint port = (uint) Int32.Parse(proxyURL.Split(new char[] {':'})[2]); | 78 | uint port = (uint) Int32.Parse(proxyURL.Split(new char[] {':'})[2]); |