diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 27 |
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, |