aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/RegionInfo.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs19
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs20
3 files changed, 48 insertions, 11 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index ff5c204..bd896bd 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -64,6 +64,16 @@ namespace OpenSim.Framework
64 64
65 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); 65 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
66 } 66 }
67 public SimpleRegionInfo(RegionInfo ConvertFrom)
68 {
69 m_regionLocX = ConvertFrom.RegionLocX;
70 m_regionLocY = ConvertFrom.RegionLocY;
71 m_internalEndPoint = ConvertFrom.InternalEndPoint;
72 m_externalHostName = ConvertFrom.ExternalHostName;
73 m_remotingPort = ConvertFrom.RemotingPort;
74 RemotingAddress = ConvertFrom.RemotingAddress;
75 RegionID = LLUUID.Zero;
76 }
67 77
68 public LLUUID RegionID = LLUUID.Zero; 78 public LLUUID RegionID = LLUUID.Zero;
69 79
@@ -238,6 +248,16 @@ namespace OpenSim.Framework
238 RemotingAddress = ConvertFrom.RemotingAddress; 248 RemotingAddress = ConvertFrom.RemotingAddress;
239 RegionID = LLUUID.Zero; 249 RegionID = LLUUID.Zero;
240 } 250 }
251 public RegionInfo(SimpleRegionInfo ConvertFrom)
252 {
253 m_regionLocX = ConvertFrom.RegionLocX;
254 m_regionLocY = ConvertFrom.RegionLocY;
255 m_internalEndPoint = ConvertFrom.InternalEndPoint;
256 m_externalHostName = ConvertFrom.ExternalHostName;
257 m_remotingPort = ConvertFrom.RemotingPort;
258 RemotingAddress = ConvertFrom.RemotingAddress;
259 RegionID = LLUUID.Zero;
260 }
241 //not in use, should swap to nini though. 261 //not in use, should swap to nini though.
242 public void LoadFromNiniSource(IConfigSource source) 262 public void LoadFromNiniSource(IConfigSource source)
243 { 263 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 01bcd83..587d940 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -269,7 +269,12 @@ namespace OpenSim.Region.Environment.Scenes
269 { 269 {
270 // Another region is up. 270 // Another region is up.
271 // We have to tell all our ScenePresences about it.. 271 // We have to tell all our ScenePresences about it..
272 //and add it to the neighbor list. 272 // and add it to the neighbor list.
273
274 // We only add it to the neighbor list if it's within 1 region from here.
275 // Agents may have draw distance values that cross two regions though, so
276 // we add it to the notify list regardless of distance.
277 // We'll check the agent's draw distance before notifying them though.
273 278
274 279
275 if (RegionInfo.RegionHandle != otherRegion.RegionHandle) 280 if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
@@ -297,12 +302,11 @@ namespace OpenSim.Region.Environment.Scenes
297 { 302 {
298 m_neighbours.Add(otherRegion); 303 m_neighbours.Add(otherRegion);
299 } 304 }
300
301 if (!(m_regionRestartNotifyList.Contains(otherRegion))) 305 if (!(m_regionRestartNotifyList.Contains(otherRegion)))
302 { 306 {
303 m_regionRestartNotifyList.Add(otherRegion); 307 m_regionRestartNotifyList.Add(otherRegion);
304 308
305 m_restartWaitTimer.Interval= 50000; 309 m_restartWaitTimer.Interval = 50000;
306 m_restartWaitTimer.AutoReset = false; 310 m_restartWaitTimer.AutoReset = false;
307 m_restartWaitTimer.Elapsed += new ElapsedEventHandler(RestartNotifyWaitElapsed); 311 m_restartWaitTimer.Elapsed += new ElapsedEventHandler(RestartNotifyWaitElapsed);
308 m_restartWaitTimer.Start(); 312 m_restartWaitTimer.Start();
@@ -312,6 +316,9 @@ namespace OpenSim.Region.Environment.Scenes
312 { 316 {
313 MainLog.Instance.Verbose("INTERGRID", "Got notice about Region at X:" + otherRegion.RegionLocX.ToString() + " Y:" + otherRegion.RegionLocY.ToString() + " but it was too far away to send to the client"); 317 MainLog.Instance.Verbose("INTERGRID", "Got notice about Region at X:" + otherRegion.RegionLocX.ToString() + " Y:" + otherRegion.RegionLocY.ToString() + " but it was too far away to send to the client");
314 } 318 }
319
320
321
315 322
316 } 323 }
317 return true; 324 return true;
@@ -1250,7 +1257,7 @@ namespace OpenSim.Region.Environment.Scenes
1250 /// <param name="presence"></param> 1257 /// <param name="presence"></param>
1251 public void InformClientOfNeighbours(ScenePresence presence) 1258 public void InformClientOfNeighbours(ScenePresence presence)
1252 { 1259 {
1253 m_sceneGridService.EnableNeighbourChildAgents(presence); 1260 m_sceneGridService.EnableNeighbourChildAgents(presence, m_neighbours);
1254 } 1261 }
1255 1262
1256 /// <summary> 1263 /// <summary>
@@ -1260,7 +1267,7 @@ namespace OpenSim.Region.Environment.Scenes
1260 /// <param name="region"></param> 1267 /// <param name="region"></param>
1261 public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region) 1268 public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region)
1262 { 1269 {
1263 m_sceneGridService.InformNeighborChildAgent(presence, region); 1270 m_sceneGridService.InformNeighborChildAgent(presence, region, m_neighbours);
1264 } 1271 }
1265 1272
1266 /// <summary> 1273 /// <summary>
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 4d2379b..68bb3b5 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -191,14 +191,24 @@ namespace OpenSim.Region.Environment.Scenes
191 /// <summary> 191 /// <summary>
192 /// 192 ///
193 /// </summary> 193 /// </summary>
194 public void EnableNeighbourChildAgents(ScenePresence avatar) 194 public void EnableNeighbourChildAgents(ScenePresence avatar, List<RegionInfo> lstneighbours)
195 { 195 {
196 List<SimpleRegionInfo> neighbours = 196 List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
197 m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); 197
198 //m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
199 for (int i = 0; i < lstneighbours.Count; i++)
200 {
201 // We don't want to keep sending to regions that consistently fail on comms.
202 if (!(lstneighbours[i].commFailTF))
203 {
204 neighbours.Add(new SimpleRegionInfo(lstneighbours[i]));
205 }
206 }
198 if (neighbours != null) 207 if (neighbours != null)
199 { 208 {
200 for (int i = 0; i < neighbours.Count; i++) 209 for (int i = 0; i < neighbours.Count; i++)
201 { 210 {
211
202 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 212 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
203 agent.BaseFolder = LLUUID.Zero; 213 agent.BaseFolder = LLUUID.Zero;
204 agent.InventoryFolder = LLUUID.Zero; 214 agent.InventoryFolder = LLUUID.Zero;
@@ -212,7 +222,7 @@ namespace OpenSim.Region.Environment.Scenes
212 } 222 }
213 } 223 }
214 } 224 }
215 public void InformNeighborChildAgent(ScenePresence avatar, RegionInfo region) 225 public void InformNeighborChildAgent(ScenePresence avatar, RegionInfo region, List<RegionInfo> neighbours)
216 { 226 {
217 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 227 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
218 agent.BaseFolder = LLUUID.Zero; 228 agent.BaseFolder = LLUUID.Zero;
@@ -257,7 +267,7 @@ namespace OpenSim.Region.Environment.Scenes
257 267
258 268
259 List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); 269 List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
260 270 // This stays uncached because we don't already know about our neighbors at this point.
261 neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); 271 neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
262 if (neighbours != null) 272 if (neighbours != null)
263 { 273 {