From 580b11779a702f6562ceedac27270830bd36738f Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Mon, 3 Nov 2008 19:56:47 +0000 Subject: On TP, child-agents weren't closed down properly, as the list of child-regions was cleared before using it to find the children. --- OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index b716980..fb8ec94 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -672,6 +672,9 @@ namespace OpenSim.Region.Environment.Scenes return; } + // the avatar.Close below will clear the child region list. We need this below for (possibly) + // closing the child agents, so save it here (we need a copy as it is Clear()-ed). + List childRegions = new List(avatar.GetKnownRegionList()); avatar.Close(); // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport @@ -721,6 +724,7 @@ namespace OpenSim.Region.Environment.Scenes if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) { SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList()); + SendCloseChildAgentConnections(avatar.UUID, childRegions); CloseConnection(m_regionInfo.RegionHandle, avatar.UUID); } // if (teleport success) // seems to be always success here -- cgit v1.1