From c04792142f332b7d1e892eb739b7e0b70b3bd0e7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 12 Aug 2016 03:58:04 +0100 Subject: partially revert commit 42a9afdc43cc.. of 06-12 not allowing more updates to be enqueued on deleted objects. Keep the catch up on deenqueue, so preserving the race condition safe guard. Let Scene sendkillObject work even if object is flaged as deleted. Still not clear how this are related to mantis 7858 or even less to 7990. --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++----- .../Region/Framework/Scenes/SceneObjectGroup.cs | 38 ++++++++++------------ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++ 3 files changed, 23 insertions(+), 30 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 33418e6..5d5ea89 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3866,15 +3866,9 @@ namespace OpenSim.Region.Framework.Scenes foreach (uint localID in localIDs) { SceneObjectPart part = GetSceneObjectPart(localID); - if (part != null) // It is a prim - { - if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) // Valid - { - if (part.ParentGroup.RootPart != part) // Child part - continue; - } - } - deleteIDs.Add(localID); + if (part != null && part.ParentGroup != null && + part.ParentGroup.RootPart == part) + deleteIDs.Add(localID); } ForEachClient(c => c.SendKillObject(deleteIDs)); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e17ef2b..df6a1cf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2065,41 +2065,37 @@ namespace OpenSim.Region.Framework.Scenes { // We need to keep track of this state in case this group is still queued for backup. IsDeleted = true; - HasGroupChanged = true; DetachFromBackup(); + if(Scene == null) // should not happen unless restart/shutdown ? + return; + SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) { SceneObjectPart part = parts[i]; - if (Scene != null) + Scene.ForEachScenePresence(delegate(ScenePresence avatar) { - Scene.ForEachScenePresence(delegate(ScenePresence avatar) - { - if (!avatar.IsChildAgent && avatar.ParentID == LocalId) - avatar.StandUp(); + if (!avatar.IsChildAgent && avatar.ParentID == LocalId) + avatar.StandUp(); - if (!silent) + if (!silent) + { + part.ClearUpdateSchedule(); + if (part == m_rootPart) { - part.ClearUpdateSchedule(); - if (part == m_rootPart) + if (!IsAttachment + || AttachedAvatar == avatar.ControllingClient.AgentId + || !HasPrivateAttachmentPoint) { - if (!IsAttachment - || AttachedAvatar == avatar.ControllingClient.AgentId - || !HasPrivateAttachmentPoint) - { - // Send a kill object immediately - avatar.ControllingClient.SendKillObject(new List { part.LocalId }); - // Also, send a terse update; in case race conditions make the object pop again in the client, - // this update will send another kill object - m_rootPart.SendTerseUpdateToClient(avatar.ControllingClient); - } + // Send a kill object immediately + avatar.ControllingClient.SendKillObject(new List { part.LocalId }); } } - }); - } + } + }); } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index bc603ae..ca5951c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5420,6 +5420,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter public void SendTerseUpdateToClient(IClientAPI remoteClient) { + if (ParentGroup.IsDeleted) + return; + if (ParentGroup.IsAttachment && (ParentGroup.RootPart != this || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint)) -- cgit v1.1