aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs94
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs4
3 files changed, 51 insertions, 51 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a432b6f..529dc9e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.Framework.Scenes
1135 1135
1136 // Kick all ROOT agents with the message, 'The simulator is going down' 1136 // Kick all ROOT agents with the message, 'The simulator is going down'
1137 ForEachScenePresence(delegate(ScenePresence avatar) 1137 ForEachScenePresence(delegate(ScenePresence avatar)
1138 { 1138 {
1139 avatar.RemoveNeighbourRegion(RegionInfo.RegionHandle); 1139 avatar.RemoveNeighbourRegion(RegionInfo.RegionHandle);
1140 1140
1141 if (!avatar.IsChildAgent) 1141 if (!avatar.IsChildAgent)
@@ -3224,7 +3224,7 @@ namespace OpenSim.Region.Framework.Scenes
3224 avatar.Scene.NeedSceneCacheClear(avatar.UUID); 3224 avatar.Scene.NeedSceneCacheClear(avatar.UUID);
3225 3225
3226 if (closeChildAgents && !avatar.IsChildAgent) 3226 if (closeChildAgents && !avatar.IsChildAgent)
3227 { 3227 {
3228 List<ulong> regions = avatar.KnownRegionHandles; 3228 List<ulong> regions = avatar.KnownRegionHandles;
3229 regions.Remove(RegionInfo.RegionHandle); 3229 regions.Remove(RegionInfo.RegionHandle);
3230 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); 3230 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9e04aa1..fb15b38 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1225,10 +1225,10 @@ namespace OpenSim.Region.Framework.Scenes
1225 public void StopFlying() 1225 public void StopFlying()
1226 { 1226 {
1227 ControllingClient.StopFlying(this); 1227 ControllingClient.StopFlying(this);
1228 } 1228 }
1229 1229
1230 // neighbouring regions we have enabled a child agent in 1230 // neighbouring regions we have enabled a child agent in
1231 // holds the seed cap for the child agent in that region 1231 // holds the seed cap for the child agent in that region
1232 private Dictionary<ulong, string> m_knownChildRegions = new Dictionary<ulong, string>(); 1232 private Dictionary<ulong, string> m_knownChildRegions = new Dictionary<ulong, string>();
1233 1233
1234 public void AddNeighbourRegion(ulong regionHandle, string cap) 1234 public void AddNeighbourRegion(ulong regionHandle, string cap)
@@ -1245,12 +1245,12 @@ namespace OpenSim.Region.Framework.Scenes
1245 } 1245 }
1246 1246
1247 public void RemoveNeighbourRegion(ulong regionHandle) 1247 public void RemoveNeighbourRegion(ulong regionHandle)
1248 { 1248 {
1249 lock (m_knownChildRegions) 1249 lock (m_knownChildRegions)
1250 { 1250 {
1251 // Checking ContainsKey is redundant as Remove works either way and returns a bool 1251 // Checking ContainsKey is redundant as Remove works either way and returns a bool
1252 // This is here to allow the Debug output to be conditional on removal 1252 // This is here to allow the Debug output to be conditional on removal
1253 //if (m_knownChildRegions.ContainsKey(regionHandle)) 1253 //if (m_knownChildRegions.ContainsKey(regionHandle))
1254 // m_log.DebugFormat(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count); 1254 // m_log.DebugFormat(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
1255 m_knownChildRegions.Remove(regionHandle); 1255 m_knownChildRegions.Remove(regionHandle);
1256 } 1256 }
@@ -1263,39 +1263,39 @@ namespace OpenSim.Region.Framework.Scenes
1263 RemoveNeighbourRegion(handle); 1263 RemoveNeighbourRegion(handle);
1264 Scene.CapsModule.DropChildSeed(UUID, handle); 1264 Scene.CapsModule.DropChildSeed(UUID, handle);
1265 } 1265 }
1266 } 1266 }
1267 1267
1268 public Dictionary<ulong, string> KnownRegions 1268 public Dictionary<ulong, string> KnownRegions
1269 { 1269 {
1270 get 1270 get
1271 { 1271 {
1272 lock (m_knownChildRegions) 1272 lock (m_knownChildRegions)
1273 return new Dictionary<ulong, string>(m_knownChildRegions); 1273 return new Dictionary<ulong, string>(m_knownChildRegions);
1274 } 1274 }
1275 set 1275 set
1276 { 1276 {
1277 // Replacing the reference is atomic but we still need to lock on 1277 // Replacing the reference is atomic but we still need to lock on
1278 // the original dictionary object which may be in use elsewhere 1278 // the original dictionary object which may be in use elsewhere
1279 lock (m_knownChildRegions) 1279 lock (m_knownChildRegions)
1280 m_knownChildRegions = value; 1280 m_knownChildRegions = value;
1281 } 1281 }
1282 } 1282 }
1283 1283
1284 public List<ulong> KnownRegionHandles 1284 public List<ulong> KnownRegionHandles
1285 { 1285 {
1286 get 1286 get
1287 { 1287 {
1288 return new List<ulong>(KnownRegions.Keys); 1288 return new List<ulong>(KnownRegions.Keys);
1289 } 1289 }
1290 } 1290 }
1291 1291
1292 public int KnownRegionCount 1292 public int KnownRegionCount
1293 { 1293 {
1294 get 1294 get
1295 { 1295 {
1296 lock (m_knownChildRegions) 1296 lock (m_knownChildRegions)
1297 return m_knownChildRegions.Count; 1297 return m_knownChildRegions.Count;
1298 } 1298 }
1299 } 1299 }
1300 1300
1301 #endregion 1301 #endregion
@@ -3338,13 +3338,13 @@ namespace OpenSim.Region.Framework.Scenes
3338 /// <returns></returns> 3338 /// <returns></returns>
3339 public void CloseChildAgents(uint newRegionX, uint newRegionY) 3339 public void CloseChildAgents(uint newRegionX, uint newRegionY)
3340 { 3340 {
3341 List<ulong> byebyeRegions = new List<ulong>(); 3341 List<ulong> byebyeRegions = new List<ulong>();
3342 List<ulong> knownRegions = KnownRegionHandles; 3342 List<ulong> knownRegions = KnownRegionHandles;
3343 m_log.DebugFormat( 3343 m_log.DebugFormat(
3344 "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}", 3344 "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}",
3345 knownRegions.Count, Scene.RegionInfo.RegionName); 3345 knownRegions.Count, Scene.RegionInfo.RegionName);
3346 //DumpKnownRegions(); 3346 //DumpKnownRegions();
3347 3347
3348 foreach (ulong handle in knownRegions) 3348 foreach (ulong handle in knownRegions)
3349 { 3349 {
3350 // Don't close the agent on this region yet 3350 // Don't close the agent on this region yet
@@ -3941,10 +3941,10 @@ namespace OpenSim.Region.Framework.Scenes
3941 public void Close() 3941 public void Close()
3942 { 3942 {
3943 if (!IsChildAgent) 3943 if (!IsChildAgent)
3944 m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false); 3944 m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false);
3945 3945
3946 // Clear known regions 3946 // Clear known regions
3947 KnownRegions = new Dictionary<ulong, string>(); 3947 KnownRegions = new Dictionary<ulong, string>();
3948 3948
3949 lock (m_reprioritization_timer) 3949 lock (m_reprioritization_timer)
3950 { 3950 {
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index 119eb1f..f0bbf0b 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -215,8 +215,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
215 string cap = presence.ControllingClient.RequestClientInfo().CapsPath; 215 string cap = presence.ControllingClient.RequestClientInfo().CapsPath;
216 216
217 presence.AddNeighbourRegion(region2, cap); 217 presence.AddNeighbourRegion(region2, cap);
218 presence.AddNeighbourRegion(region3, cap); 218 presence.AddNeighbourRegion(region3, cap);
219 219
220 Assert.That(presence.KnownRegionCount, Is.EqualTo(2)); 220 Assert.That(presence.KnownRegionCount, Is.EqualTo(2));
221 } 221 }
222 222