aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorTom2011-09-04 07:06:36 -0700
committerTom2011-09-04 07:06:36 -0700
commit66dec3b8742eff04fbbcc6e3249fe4ba87986500 (patch)
tree76cc708a821d35fac5cdbbce2de304b47064e732 /OpenSim/Region/Application
parentGuard another nullref (diff)
parentFixed BulletSim config files for Linux *.so libraries. (diff)
downloadopensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.zip
opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.gz
opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.bz2
opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.xz
Resolve merge commits, stage 1
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/Application.cs4
-rw-r--r--OpenSim/Region/Application/OpenSim.cs18
2 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 3b261e7..c130038 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -73,6 +73,7 @@ namespace OpenSim
73 AppDomain.CurrentDomain.UnhandledException += 73 AppDomain.CurrentDomain.UnhandledException +=
74 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 74 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
75 75
76
76 // Add the arguments supplied when running the application to the configuration 77 // Add the arguments supplied when running the application to the configuration
77 ArgvConfigSource configSource = new ArgvConfigSource(args); 78 ArgvConfigSource configSource = new ArgvConfigSource(args);
78 79
@@ -91,6 +92,9 @@ namespace OpenSim
91 m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config"); 92 m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
92 } 93 }
93 94
95 m_log.DebugFormat(
96 "[OPENSIM MAIN]: System Locale is {0}", System.Threading.Thread.CurrentThread.CurrentCulture);
97
94 // Increase the number of IOCP threads available. Mono defaults to a tragically low number 98 // Increase the number of IOCP threads available. Mono defaults to a tragically low number
95 int workerThreads, iocpThreads; 99 int workerThreads, iocpThreads;
96 System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads); 100 System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 86975c9..fae8be7 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -130,7 +130,9 @@ namespace OpenSim
130 //m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString()); 130 //m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString());
131 131
132 if (m_gui) // Driven by external GUI 132 if (m_gui) // Driven by external GUI
133 {
133 m_console = new CommandConsole("Region"); 134 m_console = new CommandConsole("Region");
135 }
134 else 136 else
135 { 137 {
136 switch (m_consoleType) 138 switch (m_consoleType)
@@ -547,6 +549,7 @@ namespace OpenSim
547 { 549 {
548 string regionName = string.Empty; 550 string regionName = string.Empty;
549 string regionFile = string.Empty; 551 string regionFile = string.Empty;
552
550 if (cmd.Length == 3) 553 if (cmd.Length == 3)
551 { 554 {
552 regionFile = cmd[2]; 555 regionFile = cmd[2];
@@ -556,14 +559,17 @@ namespace OpenSim
556 regionName = cmd[2]; 559 regionName = cmd[2];
557 regionFile = cmd[3]; 560 regionFile = cmd[3];
558 } 561 }
562
559 string extension = Path.GetExtension(regionFile).ToLower(); 563 string extension = Path.GetExtension(regionFile).ToLower();
560 bool isXml = extension.Equals(".xml"); 564 bool isXml = extension.Equals(".xml");
561 bool isIni = extension.Equals(".ini"); 565 bool isIni = extension.Equals(".ini");
566
562 if (!isXml && !isIni) 567 if (!isXml && !isIni)
563 { 568 {
564 MainConsole.Instance.Output("Usage: create region [\"region name\"] <region_file.ini>"); 569 MainConsole.Instance.Output("Usage: create region [\"region name\"] <region_file.ini>");
565 return; 570 return;
566 } 571 }
572
567 if (!Path.IsPathRooted(regionFile)) 573 if (!Path.IsPathRooted(regionFile))
568 { 574 {
569 string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); 575 string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
@@ -580,8 +586,18 @@ namespace OpenSim
580 regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); 586 regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
581 } 587 }
582 588
583 IScene scene; 589 Scene existingScene;
590 if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene))
591 {
592 MainConsole.Instance.OutputFormat(
593 "ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}",
594 regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName);
595
596 return;
597 }
598
584 PopulateRegionEstateInfo(regInfo); 599 PopulateRegionEstateInfo(regInfo);
600 IScene scene;
585 CreateRegion(regInfo, true, out scene); 601 CreateRegion(regInfo, true, out scene);
586 regInfo.EstateSettings.Save(); 602 regInfo.EstateSettings.Save();
587 } 603 }