aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-18 23:35:05 +0100
committerJustin Clark-Casey (justincc)2012-07-18 23:35:05 +0100
commit528004d34988d8d2349f18ff7d78c6dd50ab8b2d (patch)
treecc5d484e9a803415441fce5868b2ba965d9ff737 /OpenSim/Region/Framework/Scenes
parentStop the 15 second initial script compile wait if a script is being rezzed on... (diff)
downloadopensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.zip
opensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.gz
opensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.bz2
opensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.xz
Perform other region ready actions even if simulator is configured to leave logins disabled on startup.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs37
2 files changed, 19 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 714d70d..b8ae0ac 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -2506,7 +2506,7 @@ namespace OpenSim.Region.Framework.Scenes
2506 } 2506 }
2507 } 2507 }
2508 } 2508 }
2509 2509
2510 public void TriggerRegionReady(IScene scene) 2510 public void TriggerRegionReady(IScene scene)
2511 { 2511 {
2512 RegionReady handler = OnRegionReady; 2512 RegionReady handler = OnRegionReady;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index cadcec0..00aa0ea 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -702,6 +702,8 @@ namespace OpenSim.Region.Framework.Scenes
702 { 702 {
703 IConfig startupConfig = m_config.Configs["Startup"]; 703 IConfig startupConfig = m_config.Configs["Startup"];
704 704
705 StartDisabled = startupConfig.GetBoolean("StartDisabled", false);
706
705 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); 707 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance);
706 m_useBackup = startupConfig.GetBoolean("UseSceneBackup", m_useBackup); 708 m_useBackup = startupConfig.GetBoolean("UseSceneBackup", m_useBackup);
707 if (!m_useBackup) 709 if (!m_useBackup)
@@ -1484,35 +1486,32 @@ namespace OpenSim.Region.Framework.Scenes
1484 // this is a rare case where we know we have just went through a long cycle of heap 1486 // this is a rare case where we know we have just went through a long cycle of heap
1485 // allocations, and there is no more work to be done until someone logs in 1487 // allocations, and there is no more work to be done until someone logs in
1486 GC.Collect(); 1488 GC.Collect();
1487 1489
1488 IConfig startupConfig = m_config.Configs["Startup"]; 1490 if (!LoginLock)
1489 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
1490 { 1491 {
1491 if (LoginLock) 1492 if (!StartDisabled)
1492 {
1493 // This handles a case of a region having no scripts for the RegionReady module
1494 if (m_sceneGraph.GetActiveScriptsCount() == 0)
1495 {
1496 // XXX: need to be able to tell these have changed in RegionReady, since it will not
1497 // detect a scenario where the region has no scripts - it's listening to the
1498 // script compile queue.
1499 EventManager.TriggerLoginsEnabled(this);
1500 }
1501 }
1502 else
1503 { 1493 {
1504 m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); 1494 m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
1505 LoginsDisabled = false; 1495 LoginsDisabled = false;
1506 EventManager.TriggerLoginsEnabled(this); 1496 EventManager.TriggerLoginsEnabled(this);
1507 EventManager.TriggerRegionReady(this);
1508 } 1497 }
1509 1498
1510 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); 1499 // Region ready should always be triggered whether logins are immediately enabled or not.
1500 EventManager.TriggerRegionReady(this);
1511 } 1501 }
1512 else 1502 else
1513 { 1503 {
1514 StartDisabled = true; 1504 // This handles a case of a region having no scripts for the RegionReady module
1515 LoginsDisabled = true; 1505 if (m_sceneGraph.GetActiveScriptsCount() == 0)
1506 {
1507 // In this case, we leave it to the IRegionReadyModule to enable logins
1508
1509 // LoginLock can currently only be set by a region module implementation.
1510 // If somehow this hasn't been done then the quickest way to bugfix is to see the
1511 // NullReferenceException
1512 IRegionReadyModule rrm = RequestModuleInterface<IRegionReadyModule>();
1513 rrm.TriggerRegionReady(this);
1514 }
1516 } 1515 }
1517 } 1516 }
1518 } 1517 }