* 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

@ -2049,8 +2049,12 @@ namespace OpenSim.Region.Environment.Scenes
}
m_scene.UnlinkSceneObject(objectGroup.UUID, true);
objectGroup.m_isDeleted = true;
objectGroup.m_parts.Clear();
objectGroup.m_isDeleted = true;
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
// 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);
if (sp != null)
client = sp.ControllingClient;
SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target);
if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0)
return; // Fail silently if attached
SceneObjectGroup parentPrim = null, childPrim = null;
if (targetPart != null)
{
if (parent != 0) {
@ -3118,10 +3121,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// if (uf != (Byte)0)
// parent.RootPart.UpdateFlag = uf;
}
parentPrim.TriggerScriptChangedEvent(Changed.LINK);
parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
parentPrim.HasGroupChanged = true;
parentPrim.ScheduleGroupForFullUpdate();
if (client != null)
parentPrim.GetProperties(client);