From 19558f380a1e9cbaff849eb15262266ea79b60d2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 13 Jun 2010 19:06:22 -0700 Subject: Fixes the long-standing RegionUp bug! Plus lots of other cleanups related to neighbours. --- OpenSim/Region/Framework/Scenes/Scene.cs | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 55060c3..2ff611e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -948,12 +948,6 @@ namespace OpenSim.Region.Framework.Scenes // Let the grid service module know, so this can be cached m_eventManager.TriggerOnRegionUp(otherRegion); - RegionInfo regInfo = new RegionInfo(xcell, ycell, otherRegion.InternalEndPoint, otherRegion.ExternalHostName); - regInfo.RegionID = otherRegion.RegionID; - regInfo.RegionName = otherRegion.RegionName; - regInfo.ScopeID = otherRegion.ScopeID; - regInfo.ExternalHostName = otherRegion.ExternalHostName; - GridRegion r = new GridRegion(regInfo); try { ForEachScenePresence(delegate(ScenePresence agent) @@ -968,7 +962,7 @@ namespace OpenSim.Region.Framework.Scenes old.Add(otherRegion.RegionHandle); agent.DropOldNeighbours(old); if (m_teleportModule != null) - m_teleportModule.EnableChildAgent(agent, r); + m_teleportModule.EnableChildAgent(agent, otherRegion); } } ); @@ -1518,6 +1512,7 @@ namespace OpenSim.Region.Framework.Scenes { m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); LoginsDisabled = false; + m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface(), RegionInfo); } } } @@ -1802,6 +1797,8 @@ namespace OpenSim.Region.Framework.Scenes { RegisterCommsEvents(); + m_sceneGridService.SetScene(this); + // These two 'commands' *must be* next to each other or sim rebooting fails. //m_sceneGridService.RegisterRegion(m_interregionCommsOut, RegionInfo); @@ -1812,24 +1809,6 @@ namespace OpenSim.Region.Framework.Scenes throw new Exception(error); } - m_sceneGridService.SetScene(this); - m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface(), RegionInfo); - - //Dictionary dGridSettings = m_sceneGridService.GetGridSettings(); - - //if (dGridSettings.ContainsKey("allow_forceful_banlines")) - //{ - // if (dGridSettings["allow_forceful_banlines"] != "TRUE") - // { - // m_log.Info("[GRID]: Grid is disabling forceful parcel banlists"); - // EventManager.TriggerSetAllowForcefulBan(false); - // } - // else - // { - // m_log.Info("[GRID]: Grid is allowing forceful parcel banlists"); - // EventManager.TriggerSetAllowForcefulBan(true); - // } - //} } /// -- cgit v1.1