aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorDiva Canto2013-07-22 13:16:13 -0700
committerDiva Canto2013-07-24 14:28:14 -0700
commitaaee63af8241f23c94bc97435a3b1d17425df890 (patch)
treed33c8ac3ef0d05e81109319ae72ecde45bb32a25 /OpenSim/Region/CoreModules/Framework
parentNew Teleport protocol (V2), still compatible with V1 and older. (version of t... (diff)
downloadopensim-SC_OLD-aaee63af8241f23c94bc97435a3b1d17425df890.zip
opensim-SC_OLD-aaee63af8241f23c94bc97435a3b1d17425df890.tar.gz
opensim-SC_OLD-aaee63af8241f23c94bc97435a3b1d17425df890.tar.bz2
opensim-SC_OLD-aaee63af8241f23c94bc97435a3b1d17425df890.tar.xz
Minor improvements on TP V1 trying to make it exactly as it was before.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs32
1 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index b0c0b1d..4f11326 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -697,6 +697,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
697 ulong destinationHandle = finalDestination.RegionHandle; 697 ulong destinationHandle = finalDestination.RegionHandle;
698 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 698 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
699 699
700 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Using TP V1");
700 // Let's create an agent there if one doesn't exist yet. 701 // Let's create an agent there if one doesn't exist yet.
701 // NOTE: logout will always be false for a non-HG teleport. 702 // NOTE: logout will always be false for a non-HG teleport.
702 bool logout = false; 703 bool logout = false;
@@ -736,7 +737,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
736 737
737 // Past this point we have to attempt clean up if the teleport fails, so update transfer state. 738 // Past this point we have to attempt clean up if the teleport fails, so update transfer state.
738 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); 739 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
739 740
741 // OK, it got this agent. Let's close some child agents
742 sp.CloseChildAgents(newRegionX, newRegionY);
743
740 IClientIPEndpoint ipepClient; 744 IClientIPEndpoint ipepClient;
741 string capsPath = String.Empty; 745 string capsPath = String.Empty;
742 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 746 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
@@ -811,17 +815,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
811 // closes our existing agent which is still signalled as root. 815 // closes our existing agent which is still signalled as root.
812 sp.IsChildAgent = true; 816 sp.IsChildAgent = true;
813 817
814 // New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid
815 if (m_eqModule != null)
816 {
817 m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID);
818 }
819 else
820 {
821 sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4,
822 teleportFlags, capsPath);
823 }
824
825 // A common teleport failure occurs when we can send CreateAgent to the 818 // A common teleport failure occurs when we can send CreateAgent to the
826 // destination region but the viewer cannot establish the connection (e.g. due to network issues between 819 // destination region but the viewer cannot establish the connection (e.g. due to network issues between
827 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then 820 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then
@@ -847,6 +840,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
847 return; 840 return;
848 } 841 }
849 842
843 // OK, send TPFinish to the client, so that it starts the process of contacting the destination region
844 if (m_eqModule != null)
845 {
846 m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID);
847 }
848 else
849 {
850 sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4,
851 teleportFlags, capsPath);
852 }
853
850 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling) 854 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling)
851 { 855 {
852 m_interRegionTeleportCancels.Value++; 856 m_interRegionTeleportCancels.Value++;
@@ -908,9 +912,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
908 // Now let's make it officially a child agent 912 // Now let's make it officially a child agent
909 sp.MakeChildAgent(); 913 sp.MakeChildAgent();
910 914
911 // OK, it got this agent. Let's close some child agents
912 sp.CloseChildAgents(newRegionX, newRegionY);
913
914 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 915 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
915 916
916 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 917 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
@@ -1063,6 +1064,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1063 /// <param name='finalDestination'></param> 1064 /// <param name='finalDestination'></param>
1064 protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination) 1065 protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination)
1065 { 1066 {
1067 m_log.DebugFormat("[ZZZ]: FAIL!");
1066 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 1068 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
1067 1069
1068 if (sp.IsChildAgent) // We had set it to child before attempted TP (V1) 1070 if (sp.IsChildAgent) // We had set it to child before attempted TP (V1)