From e6eb0d9a6f2c0e792e3c1a77990fe18e153e454d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 2 Sep 2011 23:19:27 +0100 Subject: Comment out Scene.CleanDroppedAttachments() and calls. This method wasn't actually doing anything since dropped attachments retain a PCode of 9. Also, behaviour of dropped attachments in other places appears to be that they persist after avatar logout rather than get deleted. --- .../EntityTransfer/EntityTransferModule.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 72 +++++++++++----------- 2 files changed, 37 insertions(+), 37 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 766656c..45506ed 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Now let's make it officially a child agent sp.MakeChildAgent(); - sp.Scene.CleanDroppedAttachments(); +// sp.Scene.CleanDroppedAttachments(); // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9794a34..d3de37d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3182,7 +3182,7 @@ namespace OpenSim.Region.Framework.Scenes } m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); - CleanDroppedAttachments(); +// CleanDroppedAttachments(); //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); } @@ -3406,7 +3406,7 @@ namespace OpenSim.Region.Framework.Scenes if (vialogin) { - CleanDroppedAttachments(); +// CleanDroppedAttachments(); if (TestBorderCross(agent.startpos, Cardinals.E)) { @@ -5123,40 +5123,40 @@ namespace OpenSim.Region.Framework.Scenes } } - public void CleanDroppedAttachments() - { - List objectsToDelete = - new List(); - - lock (m_cleaningAttachments) - { - ForEachSOG(delegate (SceneObjectGroup grp) - { - if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp))) - { - UUID agentID = grp.OwnerID; - if (agentID == UUID.Zero) - { - objectsToDelete.Add(grp); - return; - } - - ScenePresence sp = GetScenePresence(agentID); - if (sp == null) - { - objectsToDelete.Add(grp); - return; - } - } - }); - } - - foreach (SceneObjectGroup grp in objectsToDelete) - { - m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID); - DeleteSceneObject(grp, true); - } - } +// public void CleanDroppedAttachments() +// { +// List objectsToDelete = +// new List(); +// +// lock (m_cleaningAttachments) +// { +// ForEachSOG(delegate (SceneObjectGroup grp) +// { +// if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp))) +// { +// UUID agentID = grp.OwnerID; +// if (agentID == UUID.Zero) +// { +// objectsToDelete.Add(grp); +// return; +// } +// +// ScenePresence sp = GetScenePresence(agentID); +// if (sp == null) +// { +// objectsToDelete.Add(grp); +// return; +// } +// } +// }); +// } +// +// foreach (SceneObjectGroup grp in objectsToDelete) +// { +// m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID); +// DeleteSceneObject(grp, true); +// } +// } // This method is called across the simulation connector to // determine if a given agent is allowed in this region -- cgit v1.1