diff options
author | Justin Clark-Casey (justincc) | 2012-05-28 22:14:37 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-28 22:16:06 +0100 |
commit | 8f87f55d053a69bf1f5b2758d51871c4c76e15b9 (patch) | |
tree | 2754bd0c525be4c828c584087927af90cc8b347f /OpenSim | |
parent | minor: code formatting from 0b72f773 (diff) | |
download | opensim-SC-8f87f55d053a69bf1f5b2758d51871c4c76e15b9.zip opensim-SC-8f87f55d053a69bf1f5b2758d51871c4c76e15b9.tar.gz opensim-SC-8f87f55d053a69bf1f5b2758d51871c4c76e15b9.tar.bz2 opensim-SC-8f87f55d053a69bf1f5b2758d51871c4c76e15b9.tar.xz |
If handling the failure of teleport, move agent state to CleaningUp when we start the handling.
Also fixes the log warning from ResetInTransit() if the state is cleared direct from Transferring or ReceiveAtDestination, as pointed out in mantis 5426
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ae9fb53..ab1424d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -684,13 +684,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
684 | 684 | ||
685 | protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout) | 685 | protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout) |
686 | { | 686 | { |
687 | UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | ||
688 | |||
687 | // Client never contacted destination. Let's restore everything back | 689 | // Client never contacted destination. Let's restore everything back |
688 | sp.ControllingClient.SendTeleportFailed("Problems connecting to destination."); | 690 | sp.ControllingClient.SendTeleportFailed("Problems connecting to destination."); |
689 | 691 | ||
690 | // Fail. Reset it back | 692 | // Fail. Reset it back |
691 | sp.IsChildAgent = false; | 693 | sp.IsChildAgent = false; |
692 | ReInstantiateScripts(sp); | 694 | ReInstantiateScripts(sp); |
693 | ResetFromTransit(sp.UUID); | ||
694 | 695 | ||
695 | EnableChildAgents(sp); | 696 | EnableChildAgents(sp); |
696 | 697 | ||
@@ -698,6 +699,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
698 | m_scene.SimulationService.CloseAgent(finalDestination, sp.UUID); | 699 | m_scene.SimulationService.CloseAgent(finalDestination, sp.UUID); |
699 | 700 | ||
700 | sp.Scene.EventManager.TriggerTeleportFail(sp.ControllingClient, logout); | 701 | sp.Scene.EventManager.TriggerTeleportFail(sp.ControllingClient, logout); |
702 | |||
703 | ResetFromTransit(sp.UUID); | ||
701 | } | 704 | } |
702 | 705 | ||
703 | protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) | 706 | protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) |
@@ -2158,8 +2161,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2158 | // FIXME: For now, we allow exit from any state since a thrown exception in teleport is now guranteed | 2161 | // FIXME: For now, we allow exit from any state since a thrown exception in teleport is now guranteed |
2159 | // to be handled properly - ResetFromTransit() could be invoked at any step along the process | 2162 | // to be handled properly - ResetFromTransit() could be invoked at any step along the process |
2160 | m_log.WarnFormat( | 2163 | m_log.WarnFormat( |
2161 | "[ENTITY TRANSFER MODULE]: Agent with ID should not exit directly from state {1}, should go to {2} state first", | 2164 | "[ENTITY TRANSFER MODULE]: Agent with ID {0} should not exit directly from state {1}, should go to {2} state first", |
2162 | state, AgentTransferState.CleaningUp); | 2165 | id, state, AgentTransferState.CleaningUp); |
2163 | 2166 | ||
2164 | // throw new Exception( | 2167 | // throw new Exception( |
2165 | // "Agent with ID {0} cannot exit directly from state {1}, it must go to {2} state first", | 2168 | // "Agent with ID {0} cannot exit directly from state {1}, it must go to {2} state first", |