From b7e6b58857b147ac526669b38535b13c75d0dbd3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 16 May 2010 09:01:27 -0700 Subject: Fixes mantis #4622. --- OpenSim/Region/Framework/Scenes/Scene.cs | 37 ++++++++++++-------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 401551d..de8ecc2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3355,7 +3355,6 @@ namespace OpenSim.Region.Framework.Scenes /// public void RegisterCommsEvents() { - m_sceneGridService.OnExpectUser += HandleNewUserConnection; m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing; m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent; //m_eventManager.OnRegionUp += OtherRegionUp; @@ -3376,7 +3375,6 @@ namespace OpenSim.Region.Framework.Scenes //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; //m_eventManager.OnRegionUp -= OtherRegionUp; - m_sceneGridService.OnExpectUser -= HandleNewUserConnection; m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing; m_sceneGridService.OnCloseAgentConnection -= IncomingCloseAgent; m_sceneGridService.OnGetLandData -= GetLandData; @@ -3388,22 +3386,6 @@ namespace OpenSim.Region.Framework.Scenes m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName); } - /// - /// A handler for the SceneCommunicationService event, to match that events return type of void. - /// Use NewUserConnection() directly if possible so the return type can refuse connections. - /// At the moment nothing actually seems to use this event, - /// as everything is switching to calling the NewUserConnection method directly. - /// - /// Now obsoleting this because it doesn't handle teleportFlags propertly - /// - /// - /// - [Obsolete("Please call NewUserConnection directly.")] - public void HandleNewUserConnection(AgentCircuitData agent) - { - string reason; - NewUserConnection(agent, 0, out reason); - } /// /// Do the work necessary to initiate a new user connection for a particular scene. @@ -3465,13 +3447,22 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp = GetScenePresence(agent.AgentID); if (sp != null) { - m_log.DebugFormat( - "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", - agent.AgentID, RegionInfo.RegionName); + if (sp.IsChildAgent) + { + m_log.DebugFormat( + "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", + agent.AgentID, RegionInfo.RegionName); - sp.AdjustKnownSeeds(); + sp.AdjustKnownSeeds(); - return true; + return true; + } + else + { + // We have a zombie from a crashed session. Kill it. + m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName); + sp.ControllingClient.Close(); + } } CapsModule.AddCapsHandler(agent.AgentID); -- cgit v1.1