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 54260.7.3-extended
parent
20a3907e86
commit
dca1ca1d07
|
@ -678,13 +678,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout)
|
protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout)
|
||||||
{
|
{
|
||||||
|
UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
||||||
|
|
||||||
// Client never contacted destination. Let's restore everything back
|
// Client never contacted destination. Let's restore everything back
|
||||||
sp.ControllingClient.SendTeleportFailed("Problems connecting to destination.");
|
sp.ControllingClient.SendTeleportFailed("Problems connecting to destination.");
|
||||||
|
|
||||||
// Fail. Reset it back
|
// Fail. Reset it back
|
||||||
sp.IsChildAgent = false;
|
sp.IsChildAgent = false;
|
||||||
ReInstantiateScripts(sp);
|
ReInstantiateScripts(sp);
|
||||||
ResetFromTransit(sp.UUID);
|
|
||||||
|
|
||||||
EnableChildAgents(sp);
|
EnableChildAgents(sp);
|
||||||
|
|
||||||
|
@ -692,6 +693,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
m_scene.SimulationService.CloseAgent(finalDestination, sp.UUID);
|
m_scene.SimulationService.CloseAgent(finalDestination, sp.UUID);
|
||||||
|
|
||||||
sp.Scene.EventManager.TriggerTeleportFail(sp.ControllingClient, logout);
|
sp.Scene.EventManager.TriggerTeleportFail(sp.ControllingClient, logout);
|
||||||
|
|
||||||
|
ResetFromTransit(sp.UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
|
protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
|
||||||
|
@ -2152,8 +2155,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
// FIXME: For now, we allow exit from any state since a thrown exception in teleport is now guranteed
|
// FIXME: For now, we allow exit from any state since a thrown exception in teleport is now guranteed
|
||||||
// to be handled properly - ResetFromTransit() could be invoked at any step along the process
|
// to be handled properly - ResetFromTransit() could be invoked at any step along the process
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[ENTITY TRANSFER MODULE]: Agent with ID should not exit directly from state {1}, should go to {2} state first",
|
"[ENTITY TRANSFER MODULE]: Agent with ID {0} should not exit directly from state {1}, should go to {2} state first",
|
||||||
state, AgentTransferState.CleaningUp);
|
id, state, AgentTransferState.CleaningUp);
|
||||||
|
|
||||||
// throw new Exception(
|
// throw new Exception(
|
||||||
// "Agent with ID {0} cannot exit directly from state {1}, it must go to {2} state first",
|
// "Agent with ID {0} cannot exit directly from state {1}, it must go to {2} state first",
|
||||||
|
|
Loading…
Reference in New Issue