From c13045b25e6424c90642613d400ab6ebf2744064 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 25 Aug 2010 20:11:47 +0200 Subject: Correct a logic error in attachment cleanup --- OpenSim/Region/Framework/Scenes/Scene.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2324f7a..c7b38a1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -5056,7 +5056,7 @@ namespace OpenSim.Region.Framework.Scenes { ForEachSOG(delegate (SceneObjectGroup grp) { - if (grp.RootPart.Shape.State != 0 || objectsToDelete.Contains(grp)) + if (grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp))) { UUID agentID = grp.OwnerID; if (agentID == UUID.Zero) @@ -5075,10 +5075,15 @@ namespace OpenSim.Region.Framework.Scenes }); } - foreach (SceneObjectGroup grp in objectsToDelete) + if (objectsToDelete.Count > 0) { - m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID); - DeleteSceneObject(grp, true); + m_log.DebugFormat("[SCENE]: Starting delete of {0} dropped attachments", objectsToDelete.Count); + foreach (SceneObjectGroup grp in objectsToDelete) + { + m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID); + DeleteSceneObject(grp, true); + } + m_log.Debug("[SCENE]: Finished dropped attachment deletion"); } } } -- cgit v1.1