From 730e2d6d7c0e6ddc6448c4b6064498294134d67f Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Sun, 20 Jan 2008 19:12:00 +0000 Subject: Check if remote simulator is up before attempting teleport. Teleport to a remote region should now fail gracefully if remote simulator is down. --- .../Region/Environment/Scenes/SceneCommunicationService.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index ffe8327..640cb3b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -420,11 +420,13 @@ namespace OpenSim.Region.Environment.Scenes agent.InventoryFolder = LLUUID.Zero; agent.startpos = position; agent.child = true; - avatar.Close(); - if (m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent) && - m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId, - position, false)) ; + + + if(m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent)) { + avatar.Close(); + m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId, + position, false); AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo(); string capsPath = Util.GetCapsURL(avatar.ControllingClient.AgentId); avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), @@ -443,6 +445,10 @@ namespace OpenSim.Region.Environment.Scenes CloseChildAgentConnections(avatar); } } + else + { + avatar.ControllingClient.SendTeleportFailed("Remote Region appears to be down"); + } } } } -- cgit v1.1