aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 992e6c5..bcf668f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1109,7 +1109,7 @@ namespace OpenSim.Region.Framework.Scenes
1109 1109
1110 // Kick all ROOT agents with the message, 'The simulator is going down' 1110 // Kick all ROOT agents with the message, 'The simulator is going down'
1111 ForEachScenePresence(delegate(ScenePresence avatar) 1111 ForEachScenePresence(delegate(ScenePresence avatar)
1112 { 1112 {
1113 avatar.RemoveNeighbourRegion(RegionInfo.RegionHandle); 1113 avatar.RemoveNeighbourRegion(RegionInfo.RegionHandle);
1114 1114
1115 if (!avatar.IsChildAgent) 1115 if (!avatar.IsChildAgent)
@@ -3102,7 +3102,7 @@ namespace OpenSim.Region.Framework.Scenes
3102 avatar.Scene.NeedSceneCacheClear(avatar.UUID); 3102 avatar.Scene.NeedSceneCacheClear(avatar.UUID);
3103 3103
3104 if (closeChildAgents && !avatar.IsChildAgent) 3104 if (closeChildAgents && !avatar.IsChildAgent)
3105 { 3105 {
3106 List<ulong> regions = avatar.KnownRegionHandles; 3106 List<ulong> regions = avatar.KnownRegionHandles;
3107 regions.Remove(RegionInfo.RegionHandle); 3107 regions.Remove(RegionInfo.RegionHandle);
3108 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); 3108 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e7ef377..213f51d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1075,10 +1075,10 @@ namespace OpenSim.Region.Framework.Scenes
1075 public void StopFlying() 1075 public void StopFlying()
1076 { 1076 {
1077 ControllingClient.StopFlying(this); 1077 ControllingClient.StopFlying(this);
1078 } 1078 }
1079 1079
1080 // neighbouring regions we have enabled a child agent in 1080 // neighbouring regions we have enabled a child agent in
1081 // holds the seed cap for the child agent in that region 1081 // holds the seed cap for the child agent in that region
1082 private Dictionary<ulong, string> m_knownChildRegions = new Dictionary<ulong, string>(); 1082 private Dictionary<ulong, string> m_knownChildRegions = new Dictionary<ulong, string>();
1083 1083
1084 public void AddNeighbourRegion(ulong regionHandle, string cap) 1084 public void AddNeighbourRegion(ulong regionHandle, string cap)
@@ -1095,12 +1095,12 @@ namespace OpenSim.Region.Framework.Scenes
1095 } 1095 }
1096 1096
1097 public void RemoveNeighbourRegion(ulong regionHandle) 1097 public void RemoveNeighbourRegion(ulong regionHandle)
1098 { 1098 {
1099 lock (m_knownChildRegions) 1099 lock (m_knownChildRegions)
1100 { 1100 {
1101 // Checking ContainsKey is redundant as Remove works either way and returns a bool 1101 // Checking ContainsKey is redundant as Remove works either way and returns a bool
1102 // This is here to allow the Debug output to be conditional on removal 1102 // This is here to allow the Debug output to be conditional on removal
1103 //if (m_knownChildRegions.ContainsKey(regionHandle)) 1103 //if (m_knownChildRegions.ContainsKey(regionHandle))
1104 // m_log.DebugFormat(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count); 1104 // m_log.DebugFormat(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
1105 m_knownChildRegions.Remove(regionHandle); 1105 m_knownChildRegions.Remove(regionHandle);
1106 } 1106 }
@@ -1113,39 +1113,39 @@ namespace OpenSim.Region.Framework.Scenes
1113 RemoveNeighbourRegion(handle); 1113 RemoveNeighbourRegion(handle);
1114 Scene.CapsModule.DropChildSeed(UUID, handle); 1114 Scene.CapsModule.DropChildSeed(UUID, handle);
1115 } 1115 }
1116 } 1116 }
1117 1117
1118 public Dictionary<ulong, string> KnownRegions 1118 public Dictionary<ulong, string> KnownRegions
1119 { 1119 {
1120 get 1120 get
1121 { 1121 {
1122 lock (m_knownChildRegions) 1122 lock (m_knownChildRegions)
1123 return new Dictionary<ulong, string>(m_knownChildRegions); 1123 return new Dictionary<ulong, string>(m_knownChildRegions);
1124 } 1124 }
1125 set 1125 set
1126 { 1126 {
1127 // Replacing the reference is atomic but we still need to lock on 1127 // Replacing the reference is atomic but we still need to lock on
1128 // the original dictionary object which may be in use elsewhere 1128 // the original dictionary object which may be in use elsewhere
1129 lock (m_knownChildRegions) 1129 lock (m_knownChildRegions)
1130 m_knownChildRegions = value; 1130 m_knownChildRegions = value;
1131 } 1131 }
1132 } 1132 }
1133 1133
1134 public List<ulong> KnownRegionHandles 1134 public List<ulong> KnownRegionHandles
1135 { 1135 {
1136 get 1136 get
1137 { 1137 {
1138 return new List<ulong>(KnownRegions.Keys); 1138 return new List<ulong>(KnownRegions.Keys);
1139 } 1139 }
1140 } 1140 }
1141 1141
1142 public int KnownRegionCount 1142 public int KnownRegionCount
1143 { 1143 {
1144 get 1144 get
1145 { 1145 {
1146 lock (m_knownChildRegions) 1146 lock (m_knownChildRegions)
1147 return m_knownChildRegions.Count; 1147 return m_knownChildRegions.Count;
1148 } 1148 }
1149 } 1149 }
1150 1150
1151 #endregion 1151 #endregion
@@ -2986,13 +2986,13 @@ namespace OpenSim.Region.Framework.Scenes
2986 /// <returns></returns> 2986 /// <returns></returns>
2987 public void CloseChildAgents(uint newRegionX, uint newRegionY) 2987 public void CloseChildAgents(uint newRegionX, uint newRegionY)
2988 { 2988 {
2989 List<ulong> byebyeRegions = new List<ulong>(); 2989 List<ulong> byebyeRegions = new List<ulong>();
2990 List<ulong> knownRegions = KnownRegionHandles; 2990 List<ulong> knownRegions = KnownRegionHandles;
2991 m_log.DebugFormat( 2991 m_log.DebugFormat(
2992 "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}", 2992 "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}",
2993 knownRegions.Count, Scene.RegionInfo.RegionName); 2993 knownRegions.Count, Scene.RegionInfo.RegionName);
2994 //DumpKnownRegions(); 2994 //DumpKnownRegions();
2995 2995
2996 foreach (ulong handle in knownRegions) 2996 foreach (ulong handle in knownRegions)
2997 { 2997 {
2998 // Don't close the agent on this region yet 2998 // Don't close the agent on this region yet
@@ -3434,10 +3434,10 @@ namespace OpenSim.Region.Framework.Scenes
3434 public void Close() 3434 public void Close()
3435 { 3435 {
3436 if (!IsChildAgent) 3436 if (!IsChildAgent)
3437 m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false); 3437 m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false);
3438 3438
3439 // Clear known regions 3439 // Clear known regions
3440 KnownRegions = new Dictionary<ulong, string>(); 3440 KnownRegions = new Dictionary<ulong, string>();
3441 3441
3442 lock (m_reprioritization_timer) 3442 lock (m_reprioritization_timer)
3443 { 3443 {
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