aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-18 22:09:20 +0100
committerJustin Clark-Casey (justincc)2012-07-18 22:09:20 +0100
commit58b72933c814ed393bdf29622d218dd66805af4d (patch)
treebbd2df0f4d573499b9582ee5ace5c3dc0d3213ef /OpenSim
parentEstablish EventManager.OnRegionReady event. This will only be triggerred onc... (diff)
downloadopensim-SC-58b72933c814ed393bdf29622d218dd66805af4d.zip
opensim-SC-58b72933c814ed393bdf29622d218dd66805af4d.tar.gz
opensim-SC-58b72933c814ed393bdf29622d218dd66805af4d.tar.bz2
opensim-SC-58b72933c814ed393bdf29622d218dd66805af4d.tar.xz
Fix bug where region ready was being triggered twice in quick succession if a region contained no scripts.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 12cc0d3..cadcec0 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1488,22 +1488,25 @@ namespace OpenSim.Region.Framework.Scenes
1488 IConfig startupConfig = m_config.Configs["Startup"]; 1488 IConfig startupConfig = m_config.Configs["Startup"];
1489 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false)) 1489 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
1490 { 1490 {
1491 // This handles a case of a region having no scripts for the RegionReady module 1491 if (LoginLock)
1492 if (m_sceneGraph.GetActiveScriptsCount() == 0)
1493 { 1492 {
1494 // need to be able to tell these have changed in RegionReady 1493 // This handles a case of a region having no scripts for the RegionReady module
1495 LoginLock = false; 1494 if (m_sceneGraph.GetActiveScriptsCount() == 0)
1496 EventManager.TriggerLoginsEnabled(this); 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 }
1497 } 1501 }
1498 1502 else
1499 // For RegionReady lockouts
1500 if (!LoginLock)
1501 { 1503 {
1502 m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); 1504 m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
1503 LoginsDisabled = false; 1505 LoginsDisabled = false;
1506 EventManager.TriggerLoginsEnabled(this);
1504 EventManager.TriggerRegionReady(this); 1507 EventManager.TriggerRegionReady(this);
1505 } 1508 }
1506 1509
1507 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); 1510 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
1508 } 1511 }
1509 else 1512 else