aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs59
1 files changed, 33 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 3e7575b..5124aed 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -684,6 +684,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
684 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); 684 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
685 } 685 }
686 686
687 //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Contacting destination...");
688
687 // Let's create an agent there if one doesn't exist yet. 689 // Let's create an agent there if one doesn't exist yet.
688 // NOTE: logout will always be false for a non-HG teleport. 690 // NOTE: logout will always be false for a non-HG teleport.
689 bool logout = false; 691 bool logout = false;
@@ -724,8 +726,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
724 // Past this point we have to attempt clean up if the teleport fails, so update transfer state. 726 // Past this point we have to attempt clean up if the teleport fails, so update transfer state.
725 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); 727 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
726 728
727 // OK, it got this agent. Let's close some child agents 729 #region old protocol
728 sp.CloseChildAgents(newRegionX, newRegionY);
729 730
730 IClientIPEndpoint ipepClient; 731 IClientIPEndpoint ipepClient;
731 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 732 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
@@ -775,11 +776,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
775 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 776 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
776 } 777 }
777 778
779 #endregion old protocol
780
778 // Let's send a full update of the agent. This is a synchronous call. 781 // Let's send a full update of the agent. This is a synchronous call.
779 AgentData agent = new AgentData(); 782 AgentData agent = new AgentData();
780 sp.CopyTo(agent); 783 sp.CopyTo(agent);
781 agent.Position = position; 784 agent.Position = position;
782 SetCallbackURL(agent, sp.Scene.RegionInfo); 785 //SetCallbackURL(agent, sp.Scene.RegionInfo);
783 786
784 //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Updating agent..."); 787 //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Updating agent...");
785 788
@@ -801,6 +804,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
801 // closes our existing agent which is still signalled as root. 804 // closes our existing agent which is still signalled as root.
802 sp.IsChildAgent = true; 805 sp.IsChildAgent = true;
803 806
807 // New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid
804 if (m_eqModule != null) 808 if (m_eqModule != null)
805 { 809 {
806 m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); 810 m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID);
@@ -853,30 +857,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
853 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", 857 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}",
854 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); 858 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name);
855 859
856 // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which 860 //// TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which
857 // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation 861 //// trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation
858 // that the client contacted the destination before we close things here. 862 //// that the client contacted the destination before we close things here.
859 if (!m_entityTransferStateMachine.WaitForAgentArrivedAtDestination(sp.UUID)) 863 //if (!m_entityTransferStateMachine.WaitForAgentArrivedAtDestination(sp.UUID))
860 { 864 //{
861 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) 865 // if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
862 { 866 // {
863 m_interRegionTeleportAborts.Value++; 867 // m_interRegionTeleportAborts.Value++;
864 868
865 m_log.DebugFormat( 869 // m_log.DebugFormat(
866 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.", 870 // "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.",
867 sp.Name, finalDestination.RegionName, sp.Scene.Name); 871 // sp.Name, finalDestination.RegionName, sp.Scene.Name);
868 872
869 return; 873 // return;
870 } 874 // }
871 875
872 m_log.WarnFormat( 876 // m_log.WarnFormat(
873 "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", 877 // "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.",
874 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 878 // sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
875 879
876 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion."); 880 // Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion.");
877 881
878 return; 882 // return;
879 } 883 //}
880 884
881 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 885 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
882 886
@@ -897,6 +901,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
897 // Now let's make it officially a child agent 901 // Now let's make it officially a child agent
898 sp.MakeChildAgent(); 902 sp.MakeChildAgent();
899 903
904 // OK, it got this agent. Let's close some child agents
905 sp.CloseChildAgents(newRegionX, newRegionY);
906
900 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 907 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
901 908
902 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 909 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
@@ -907,7 +914,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
907 // 914 //
908 // This sleep can be increased if necessary. However, whilst it's active, 915 // This sleep can be increased if necessary. However, whilst it's active,
909 // an agent cannot teleport back to this region if it has teleported away. 916 // an agent cannot teleport back to this region if it has teleported away.
910 Thread.Sleep(2000); 917 Thread.Sleep(15000);
911 918
912 sp.Scene.IncomingCloseAgent(sp.UUID, false); 919 sp.Scene.IncomingCloseAgent(sp.UUID, false);
913 } 920 }