aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-07 18:52:30 +0100
committerJustin Clark-Casey (justincc)2013-08-07 18:52:30 +0100
commita33a1ac958b3158c9ce009e5d2915c165fb11c23 (patch)
treee2d5adb880792c34ba485238ef452f99e0896366 /OpenSim
parentAmend to last commit -- remove the obsolete var from OpenSim.ini.example (diff)
downloadopensim-SC_OLD-a33a1ac958b3158c9ce009e5d2915c165fb11c23.zip
opensim-SC_OLD-a33a1ac958b3158c9ce009e5d2915c165fb11c23.tar.gz
opensim-SC_OLD-a33a1ac958b3158c9ce009e5d2915c165fb11c23.tar.bz2
opensim-SC_OLD-a33a1ac958b3158c9ce009e5d2915c165fb11c23.tar.xz
Add post-CreateAgent teleport cancellation/abortion functionality from v1 transfer protocol into v2.
This stops OpenSimulator still trying to teleport the user if they hit cancel on the teleport screen or closed the viewer whilst the protocol was trying to create an agent on the remote region. Ideally, the code may also attempt to tell the destination simulator that the agent should be removed (accounting for issues where the destination was not responding in the first place, etc.)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 96cd6b9..80c125a 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -956,6 +956,27 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
956 return; 956 return;
957 } 957 }
958 958
959 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling)
960 {
961 m_interRegionTeleportCancels.Value++;
962
963 m_log.DebugFormat(
964 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request",
965 sp.Name, finalDestination.RegionName, sp.Scene.Name);
966
967 return;
968 }
969 else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
970 {
971 m_interRegionTeleportAborts.Value++;
972
973 m_log.DebugFormat(
974 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.",
975 sp.Name, finalDestination.RegionName, sp.Scene.Name);
976
977 return;
978 }
979
959 // Past this point we have to attempt clean up if the teleport fails, so update transfer state. 980 // Past this point we have to attempt clean up if the teleport fails, so update transfer state.
960 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); 981 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
961 982