From 3ea6c25fb6cb4711d4e4533469033ff389c780b1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Mar 2012 20:15:38 -0700 Subject: [PATCH] Teleports: bounce off repeated requests of teleporting the same agent. Some scripts do that, and that fails the whole thing. --- .../EntityTransfer/EntityTransferModule.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index e52a19579b..a8944605ca 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -314,6 +314,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } + if (IsInTransit(sp.UUID)) // Avie is already on the way. Caller shouldn't do this. + return; + m_log.DebugFormat( "[ENTITY TRANSFER MODULE]: Request Teleport to {0} ({1}) {2}/{3}", reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); @@ -1870,6 +1873,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } } + protected bool IsInTransit(UUID id) + { + lock (m_agentsInTransit) + { + if (m_agentsInTransit.Contains(id)) + return true; + } + return false; + } + protected bool ResetFromTransit(UUID id) { lock (m_agentsInTransit)