aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-09-27 19:14:21 +0100
committerJustin Clark-Casey (justincc)2013-09-27 19:14:21 +0100
commitb16bc7b01ca0691758e66f85238d657f02271082 (patch)
tree4e121ace10b7dee25e1311268a84d3e95946f6f9 /OpenSim/Region/CoreModules
parentminor code formatting for the sake of consistency and readability (diff)
downloadopensim-SC_OLD-b16bc7b01ca0691758e66f85238d657f02271082.zip
opensim-SC_OLD-b16bc7b01ca0691758e66f85238d657f02271082.tar.gz
opensim-SC_OLD-b16bc7b01ca0691758e66f85238d657f02271082.tar.bz2
opensim-SC_OLD-b16bc7b01ca0691758e66f85238d657f02271082.tar.xz
refactor: rename Scene.IncomingCloseAgent() to CloseAgent() in order to make it clear that all non-clientstack callers should be using this rather than RemoveClient() in order to step through the ScenePresence state machine properly.
Adds IScene.CloseAgent() to replace RemoveClient()
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs6
5 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index fd493fc..4e58045 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -719,7 +719,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
719 SceneObjectGroup rezzedAtt = presence.GetAttachments()[0]; 719 SceneObjectGroup rezzedAtt = presence.GetAttachments()[0];
720 720
721 m_numberOfAttachEventsFired = 0; 721 m_numberOfAttachEventsFired = 0;
722 scene.IncomingCloseAgent(presence.UUID, false); 722 scene.CloseAgent(presence.UUID, false);
723 723
724 // Check that we can't retrieve this attachment from the scene. 724 // Check that we can't retrieve this attachment from the scene.
725 Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null); 725 Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null);
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index 0cd495c..3b6d970 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
272 if (sp.IsChildAgent) 272 if (sp.IsChildAgent)
273 return; 273 return;
274 sp.ControllingClient.Kick(reason); 274 sp.ControllingClient.Kick(reason);
275 sp.Scene.IncomingCloseAgent(sp.UUID, true); 275 sp.Scene.CloseAgent(sp.UUID, true);
276 } 276 }
277 277
278 private void OnIncomingInstantMessage(GridInstantMessage msg) 278 private void OnIncomingInstantMessage(GridInstantMessage msg)
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8ae81ac..aa8a4db 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -972,7 +972,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
972 972
973 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 973 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
974 { 974 {
975 if (!sp.Scene.IncomingPreCloseAgent(sp)) 975 if (!sp.Scene.IncomingPreCloseClient(sp))
976 return; 976 return;
977 977
978 // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before 978 // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before
@@ -983,7 +983,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
983 // an agent cannot teleport back to this region if it has teleported away. 983 // an agent cannot teleport back to this region if it has teleported away.
984 Thread.Sleep(2000); 984 Thread.Sleep(2000);
985 985
986 sp.Scene.IncomingCloseAgent(sp.UUID, false); 986 sp.Scene.CloseAgent(sp.UUID, false);
987 } 987 }
988 else 988 else
989 { 989 {
@@ -1137,7 +1137,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1137 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1137 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1138 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1138 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
1139 { 1139 {
1140 if (!sp.Scene.IncomingPreCloseAgent(sp)) 1140 if (!sp.Scene.IncomingPreCloseClient(sp))
1141 return; 1141 return;
1142 1142
1143 // RED ALERT!!!! 1143 // RED ALERT!!!!
@@ -1154,7 +1154,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1154 m_log.DebugFormat( 1154 m_log.DebugFormat(
1155 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); 1155 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name);
1156 1156
1157 sp.Scene.IncomingCloseAgent(sp.UUID, false); 1157 sp.Scene.CloseAgent(sp.UUID, false);
1158 } 1158 }
1159 else 1159 else
1160 { 1160 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 5c098a8..678f3dc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -311,7 +311,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
311// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 311// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
312// s.RegionInfo.RegionName, destination.RegionHandle); 312// s.RegionInfo.RegionName, destination.RegionHandle);
313 313
314 m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token); 314 m_scenes[destination.RegionID].CloseAgent(id, false, auth_token);
315 return true; 315 return true;
316 } 316 }
317 317
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 31547a6..42db1cf 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
562 if (!Scene.TeleportClientHome(user, s.ControllingClient)) 562 if (!Scene.TeleportClientHome(user, s.ControllingClient))
563 { 563 {
564 s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out."); 564 s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out.");
565 Scene.IncomingCloseAgent(s.UUID, false); 565 Scene.CloseAgent(s.UUID, false);
566 } 566 }
567 } 567 }
568 } 568 }
@@ -797,7 +797,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
797 if (!Scene.TeleportClientHome(prey, s.ControllingClient)) 797 if (!Scene.TeleportClientHome(prey, s.ControllingClient))
798 { 798 {
799 s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); 799 s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
800 Scene.IncomingCloseAgent(s.UUID, false); 800 Scene.CloseAgent(s.UUID, false);
801 } 801 }
802 } 802 }
803 } 803 }
@@ -820,7 +820,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
820 if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient)) 820 if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient))
821 { 821 {
822 p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); 822 p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
823 Scene.IncomingCloseAgent(p.UUID, false); 823 Scene.CloseAgent(p.UUID, false);
824 } 824 }
825 } 825 }
826 } 826 }