From 2108d328df70c2156efecbd2211c8212843f62ff Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 17 Dec 2008 19:12:56 +0000 Subject: * revert r7724 so that PresenceChildStatus() starts throwing NRE's again * apparantly logout code relies on this happening in certain circumstances. Really, the root issue needs to be investigated. --- OpenSim/Framework/IScene.cs | 5 ++++- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 1 + OpenSim/Region/Environment/Scenes/Scene.cs | 10 +++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 5978245..d3c3843 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs @@ -80,7 +80,10 @@ namespace OpenSim.Framework /// Used by ClientView when a 'kick everyone' or 'estate message' occurs /// /// AvatarID to lookup - /// true if the presence is a child agent, false if the presence does not exist or is not a child agent + /// true if the presence is a child agent, false if the presence is a root exception + /// + /// Thrown if the agent does not exist. + /// bool PresenceChildStatus(UUID agentId); // Diva: get this out of here!!! diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e34c8ec..9d6e3af 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -333,6 +333,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_groupPowers.ContainsKey(groupID)) return m_groupPowers[groupID]; + return 0; } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3aa2470..8dcd071 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -4133,10 +4133,14 @@ namespace OpenSim.Region.Environment.Scenes { ScenePresence cp = GetScenePresence(avatarID); - if (cp != null) - return cp.IsChildAgent; + // FIXME: This is really crap - some logout code is relying on a NullReferenceException to halt its processing + // This needs to be fixed properly by cleaning up the logout code. + //if (cp != null) + // return cp.IsChildAgent; - return false; + //return false; + + return cp.IsChildAgent; } /// -- cgit v1.1