aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-01-14 19:40:17 +0000
committerJustin Clark-Casey (justincc)2015-01-14 19:45:19 +0000
commitbeef41f24cfdc57e584d19beed423cba83b7f829 (patch)
tree7bbf881eb3cc4ce5fd9d8d8c39c2dbc82126ed9d /OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
parentAlso deleted the option of setting Cap_WebFetchInventoryDescendents from Open... (diff)
downloadopensim-SC_OLD-beef41f24cfdc57e584d19beed423cba83b7f829.zip
opensim-SC_OLD-beef41f24cfdc57e584d19beed423cba83b7f829.tar.gz
opensim-SC_OLD-beef41f24cfdc57e584d19beed423cba83b7f829.tar.bz2
opensim-SC_OLD-beef41f24cfdc57e584d19beed423cba83b7f829.tar.xz
Stop simulators attempting to contact registered but offline regions (RegionFlags.Persistent but not RegioNFlags.RegionOnline) on startup and when an avatar completes a teleport.
This eliminates spurious network calls and failure reporting. This is done by adding RegionFlags to the GridRegion returned data in a backward compatible way as an alternative to multiple IGridService.GetRegionFlags() calls Using a simulator or a grid service older than this commit will just see previous behaviour.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs27
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 9db5309..8101768 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -109,10 +109,35 @@ namespace OpenSim.Region.Framework.Scenes
109 List<GridRegion> neighbours 109 List<GridRegion> neighbours
110 = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID); 110 = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
111 111
112 m_log.DebugFormat("{0} Informing {1} neighbours that region {2} is up", LogHeader, neighbours.Count, m_scene.Name); 112 List<GridRegion> onlineNeighbours = new List<GridRegion>();
113 113
114 foreach (GridRegion n in neighbours) 114 foreach (GridRegion n in neighbours)
115 { 115 {
116 OpenSim.Framework.RegionFlags? regionFlags = n.RegionFlags;
117
118// m_log.DebugFormat(
119// "{0}: Region flags for {1} as seen by {2} are {3}",
120// LogHeader, n.RegionName, m_scene.Name, regionFlags != null ? regionFlags.ToString() : "not present");
121
122 // Robust services before 2015-01-14 do not return the regionFlags information. In this case, we could
123 // make a separate RegionFlags call but this would involve a network call for each neighbour.
124 if (regionFlags != null)
125 {
126 if ((regionFlags & OpenSim.Framework.RegionFlags.RegionOnline) != 0)
127 onlineNeighbours.Add(n);
128 }
129 else
130 {
131 onlineNeighbours.Add(n);
132 }
133 }
134
135 m_log.DebugFormat(
136 "{0} Informing {1} neighbours that region {2} is up",
137 LogHeader, onlineNeighbours.Count, m_scene.Name);
138
139 foreach (GridRegion n in onlineNeighbours)
140 {
116 InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync; 141 InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
117 d.BeginInvoke(neighbourService, region, n.RegionHandle, 142 d.BeginInvoke(neighbourService, region, n.RegionHandle,
118 InformNeighborsThatRegionisUpCompleted, 143 InformNeighborsThatRegionisUpCompleted,