aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorMW2008-06-26 17:23:05 +0000
committerMW2008-06-26 17:23:05 +0000
commit314181a70d00d99506d3752653f1b0b87512ea44 (patch)
treeb1d048f6635209506642256c082004981e1585e2 /OpenSim/Region/Application
parentAs per the suggestion on the mailing list, added support for a OpenSim.xml co... (diff)
downloadopensim-SC_OLD-314181a70d00d99506d3752653f1b0b87512ea44.zip
opensim-SC_OLD-314181a70d00d99506d3752653f1b0b87512ea44.tar.gz
opensim-SC_OLD-314181a70d00d99506d3752653f1b0b87512ea44.tar.bz2
opensim-SC_OLD-314181a70d00d99506d3752653f1b0b87512ea44.tar.xz
small change to last commit
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs46
2 files changed, 25 insertions, 25 deletions
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 }