aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs38
1 files changed, 20 insertions, 18 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 76ac246..f378153 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -40,7 +40,7 @@ using OpenSim.Framework.Communications;
40using OpenSim.Framework.Console; 40using OpenSim.Framework.Console;
41using OpenSim.Framework.Servers; 41using OpenSim.Framework.Servers;
42using OpenSim.Framework.Servers.HttpServer; 42using OpenSim.Framework.Servers.HttpServer;
43using OpenSim.Framework.Statistics; 43using OpenSim.Framework.Monitoring;
44using OpenSim.Region.ClientStack; 44using OpenSim.Region.ClientStack;
45using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; 45using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
46using OpenSim.Region.Framework; 46using OpenSim.Region.Framework;
@@ -300,7 +300,7 @@ namespace OpenSim
300 300
301 private void HandleCommanderCommand(string module, string[] cmd) 301 private void HandleCommanderCommand(string module, string[] cmd)
302 { 302 {
303 m_sceneManager.SendCommandToPluginModules(cmd); 303 SceneManager.SendCommandToPluginModules(cmd);
304 } 304 }
305 305
306 private void HandleCommanderHelp(string module, string[] cmd) 306 private void HandleCommanderHelp(string module, string[] cmd)
@@ -318,7 +318,10 @@ namespace OpenSim
318 // Called from base.StartUp() 318 // Called from base.StartUp()
319 319
320 m_httpServerPort = m_networkServersInfo.HttpListenerPort; 320 m_httpServerPort = m_networkServersInfo.HttpListenerPort;
321 m_sceneManager.OnRestartSim += handleRestartRegion; 321 SceneManager.OnRestartSim += handleRestartRegion;
322
323 // Only start the memory watchdog once all regions are ready
324 SceneManager.OnRegionsReadyStatusChange += sm => MemoryWatchdog.Enabled = sm.AllRegionsReady;
322 } 325 }
323 326
324 /// <summary> 327 /// <summary>
@@ -480,7 +483,7 @@ namespace OpenSim
480 scene.SnmpService.BootInfo("ScriptEngine started", scene); 483 scene.SnmpService.BootInfo("ScriptEngine started", scene);
481 } 484 }
482 485
483 m_sceneManager.Add(scene); 486 SceneManager.Add(scene);
484 487
485 if (m_autoCreateClientStack) 488 if (m_autoCreateClientStack)
486 { 489 {
@@ -510,7 +513,6 @@ namespace OpenSim
510 } 513 }
511 514
512 scene.Start(); 515 scene.Start();
513
514 scene.StartScripts(); 516 scene.StartScripts();
515 517
516 return clientServer; 518 return clientServer;
@@ -644,14 +646,14 @@ namespace OpenSim
644 { 646 {
645 // only need to check this if we are not at the 647 // only need to check this if we are not at the
646 // root level 648 // root level
647 if ((m_sceneManager.CurrentScene != null) && 649 if ((SceneManager.CurrentScene != null) &&
648 (m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID)) 650 (SceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
649 { 651 {
650 m_sceneManager.TrySetCurrentScene(".."); 652 SceneManager.TrySetCurrentScene("..");
651 } 653 }
652 654
653 scene.DeleteAllSceneObjects(); 655 scene.DeleteAllSceneObjects();
654 m_sceneManager.CloseScene(scene); 656 SceneManager.CloseScene(scene);
655 ShutdownClientServer(scene.RegionInfo); 657 ShutdownClientServer(scene.RegionInfo);
656 658
657 if (!cleanup) 659 if (!cleanup)
@@ -693,7 +695,7 @@ namespace OpenSim
693 public void RemoveRegion(string name, bool cleanUp) 695 public void RemoveRegion(string name, bool cleanUp)
694 { 696 {
695 Scene target; 697 Scene target;
696 if (m_sceneManager.TryGetScene(name, out target)) 698 if (SceneManager.TryGetScene(name, out target))
697 RemoveRegion(target, cleanUp); 699 RemoveRegion(target, cleanUp);
698 } 700 }
699 701
@@ -706,13 +708,13 @@ namespace OpenSim
706 { 708 {
707 // only need to check this if we are not at the 709 // only need to check this if we are not at the
708 // root level 710 // root level
709 if ((m_sceneManager.CurrentScene != null) && 711 if ((SceneManager.CurrentScene != null) &&
710 (m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID)) 712 (SceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
711 { 713 {
712 m_sceneManager.TrySetCurrentScene(".."); 714 SceneManager.TrySetCurrentScene("..");
713 } 715 }
714 716
715 m_sceneManager.CloseScene(scene); 717 SceneManager.CloseScene(scene);
716 ShutdownClientServer(scene.RegionInfo); 718 ShutdownClientServer(scene.RegionInfo);
717 } 719 }
718 720
@@ -724,7 +726,7 @@ namespace OpenSim
724 public void CloseRegion(string name) 726 public void CloseRegion(string name)
725 { 727 {
726 Scene target; 728 Scene target;
727 if (m_sceneManager.TryGetScene(name, out target)) 729 if (SceneManager.TryGetScene(name, out target))
728 CloseRegion(target); 730 CloseRegion(target);
729 } 731 }
730 732
@@ -980,7 +982,7 @@ namespace OpenSim
980 982
981 try 983 try
982 { 984 {
983 m_sceneManager.Close(); 985 SceneManager.Close();
984 } 986 }
985 catch (Exception e) 987 catch (Exception e)
986 { 988 {
@@ -1005,7 +1007,7 @@ namespace OpenSim
1005 /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> 1007 /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param>
1006 public void GetAvatarNumber(out int usernum) 1008 public void GetAvatarNumber(out int usernum)
1007 { 1009 {
1008 usernum = m_sceneManager.GetCurrentSceneAvatars().Count; 1010 usernum = SceneManager.GetCurrentSceneAvatars().Count;
1009 } 1011 }
1010 1012
1011 /// <summary> 1013 /// <summary>
@@ -1014,7 +1016,7 @@ namespace OpenSim
1014 /// <param name="regionnum">The first out parameter describing the number of regions</param> 1016 /// <param name="regionnum">The first out parameter describing the number of regions</param>
1015 public void GetRegionNumber(out int regionnum) 1017 public void GetRegionNumber(out int regionnum)
1016 { 1018 {
1017 regionnum = m_sceneManager.Scenes.Count; 1019 regionnum = SceneManager.Scenes.Count;
1018 } 1020 }
1019 1021
1020 /// <summary> 1022 /// <summary>