diff options
3 files changed, 34 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ea2d9b5..31db778 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1054,7 +1054,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1054 | // DECREASING THE WAIT TIME HERE WILL EITHER RESULT IN A VIEWER CRASH OR | 1054 | // DECREASING THE WAIT TIME HERE WILL EITHER RESULT IN A VIEWER CRASH OR |
1055 | // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. | 1055 | // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. |
1056 | Thread.Sleep(15000); | 1056 | Thread.Sleep(15000); |
1057 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | 1057 | |
1058 | if (!sp.DoNotClose) | ||
1059 | { | ||
1060 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | ||
1061 | } | ||
1062 | else | ||
1063 | { | ||
1064 | sp.DoNotClose = false; | ||
1065 | } | ||
1058 | } | 1066 | } |
1059 | else | 1067 | else |
1060 | // now we have a child agent in this region. | 1068 | // now we have a child agent in this region. |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 84fdef0..f4622b6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3682,19 +3682,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
3682 | { | 3682 | { |
3683 | ScenePresence sp = GetScenePresence(agent.AgentID); | 3683 | ScenePresence sp = GetScenePresence(agent.AgentID); |
3684 | 3684 | ||
3685 | if (sp != null && !sp.IsChildAgent) | 3685 | if (sp != null) |
3686 | { | 3686 | { |
3687 | // We have a zombie from a crashed session. | 3687 | if (!sp.IsChildAgent) |
3688 | // Or the same user is trying to be root twice here, won't work. | 3688 | { |
3689 | // Kill it. | 3689 | // We have a zombie from a crashed session. |
3690 | m_log.WarnFormat( | 3690 | // Or the same user is trying to be root twice here, won't work. |
3691 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3691 | // Kill it. |
3692 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3692 | m_log.WarnFormat( |
3693 | 3693 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | |
3694 | if (sp.ControllingClient != null) | 3694 | sp.Name, sp.UUID, RegionInfo.RegionName); |
3695 | sp.ControllingClient.Close(true); | 3695 | |
3696 | if (sp.ControllingClient != null) | ||
3697 | sp.ControllingClient.Close(true); | ||
3696 | 3698 | ||
3697 | sp = null; | 3699 | sp = null; |
3700 | } | ||
3701 | else | ||
3702 | { | ||
3703 | sp.DoNotClose = true; | ||
3704 | } | ||
3698 | } | 3705 | } |
3699 | 3706 | ||
3700 | // Optimistic: add or update the circuit data with the new agent circuit data and teleport flags. | 3707 | // Optimistic: add or update the circuit data with the new agent circuit data and teleport flags. |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f9190d9..d3e1946 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -717,6 +717,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
717 | } | 717 | } |
718 | } | 718 | } |
719 | 719 | ||
720 | /// <summary> | ||
721 | /// Used by the entity transfer module to signal when the presence should not be closed because a subsequent | ||
722 | /// teleport is reusing the connection. | ||
723 | /// </summary> | ||
724 | /// <remarks>May be refactored or move somewhere else soon.</remarks> | ||
725 | public bool DoNotClose { get; set; } | ||
726 | |||
720 | private float m_speedModifier = 1.0f; | 727 | private float m_speedModifier = 1.0f; |
721 | 728 | ||
722 | public float SpeedModifier | 729 | public float SpeedModifier |