From 17c25796b8517b5c50c5f1e561eeed5bdf68e480 Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Sat, 19 Jan 2008 20:34:54 +0000 Subject: [PATCH] checking return code may make failed teleports fail more gracefully. --- .../Framework/Communications/LoginService.cs | 5 +++ .../Scenes/SceneCommunicationService.cs | 36 ++++++++++--------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 889b70a3ec..3a68bfb5ff 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -92,6 +92,11 @@ namespace OpenSim.Framework.UserManagement string firstname = (string) requestData["first"]; string lastname = (string) requestData["last"]; + if( requestData.Contains("version")) + { + string clientversion = (string)requestData["version"]; + MainLog.Instance.Verbose("LOGIN","Client Version " + clientversion + " for " + firstname + " " + lastname); + } userProfile = GetTheUser(firstname, lastname); diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 29747c1a9d..ffe83270e3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -421,25 +421,27 @@ namespace OpenSim.Region.Environment.Scenes agent.startpos = position; agent.child = true; avatar.Close(); - m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent); + if (m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent) && 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), - capsPath); - avatar.MakeChildAgent(); - if (KillObject != null) + position, false)) ; { - KillObject(avatar.LocalId); - } - uint newRegionX = (uint) (regionHandle >> 40); - uint newRegionY = (((uint) (regionHandle)) >> 8); - uint oldRegionX = (uint) (m_regionInfo.RegionHandle >> 40); - uint oldRegionY = (((uint) (m_regionInfo.RegionHandle)) >> 8); - if (Util.fast_distance2d((int) (newRegionX - oldRegionX), (int) (newRegionY - oldRegionY)) > 3) - { - CloseChildAgentConnections(avatar); + AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo(); + string capsPath = Util.GetCapsURL(avatar.ControllingClient.AgentId); + avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), + capsPath); + avatar.MakeChildAgent(); + if (KillObject != null) + { + KillObject(avatar.LocalId); + } + uint newRegionX = (uint)(regionHandle >> 40); + uint newRegionY = (((uint)(regionHandle)) >> 8); + uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); + uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); + if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) + { + CloseChildAgentConnections(avatar); + } } } }