Correct a logic error in attachment cleanup

avinationmerge
Melanie Thielker 2010-08-25 20:11:47 +02:00
parent 314d1171ef
commit c13045b25e
1 changed files with 9 additions and 4 deletions

View File

@ -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");
}
}
}