* Lock the parts for the old group while we're clearing it as well - not much point doing one without the other

* Shouldn't result in any deadlocks as I don't think there are any locks in the calling code
0.6.3-post-fixes
Justin Clarke Casey 2009-02-03 19:36:57 +00:00
parent cff7664a37
commit 984cf94375
2 changed files with 11 additions and 2 deletions

View File

@ -2050,7 +2050,11 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.UnlinkSceneObject(objectGroup.UUID, true); m_scene.UnlinkSceneObject(objectGroup.UUID, true);
objectGroup.m_isDeleted = true; objectGroup.m_isDeleted = true;
objectGroup.m_parts.Clear();
lock (objectGroup.m_parts)
{
objectGroup.m_parts.Clear();
}
// Can't do this yet since backup still makes use of the root part without any synchronization // Can't do this yet since backup still makes use of the root part without any synchronization
// objectGroup.m_rootPart = null; // objectGroup.m_rootPart = null;

View File

@ -3097,10 +3097,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScenePresence sp = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); ScenePresence sp = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
if (sp != null) if (sp != null)
client = sp.ControllingClient; client = sp.ControllingClient;
SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target); SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target);
if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0) if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0)
return; // Fail silently if attached return; // Fail silently if attached
SceneObjectGroup parentPrim = null, childPrim = null; SceneObjectGroup parentPrim = null, childPrim = null;
if (targetPart != null) if (targetPart != null)
{ {
if (parent != 0) { if (parent != 0) {
@ -3118,10 +3121,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// if (uf != (Byte)0) // if (uf != (Byte)0)
// parent.RootPart.UpdateFlag = uf; // parent.RootPart.UpdateFlag = uf;
} }
parentPrim.TriggerScriptChangedEvent(Changed.LINK); parentPrim.TriggerScriptChangedEvent(Changed.LINK);
parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
parentPrim.HasGroupChanged = true; parentPrim.HasGroupChanged = true;
parentPrim.ScheduleGroupForFullUpdate(); parentPrim.ScheduleGroupForFullUpdate();
if (client != null) if (client != null)
parentPrim.GetProperties(client); parentPrim.GetProperties(client);