diff options
author | Justin Clarke Casey | 2009-02-03 19:36:57 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-03 19:36:57 +0000 |
commit | 984cf943757b15f05c2cfcb540c6647754a531e7 (patch) | |
tree | 11b213fcefddc9fdaddc95461eeee1ef2c8f8b10 /OpenSim | |
parent | * Mark the old group after linking as deleted (diff) | |
download | opensim-SC_OLD-984cf943757b15f05c2cfcb540c6647754a531e7.zip opensim-SC_OLD-984cf943757b15f05c2cfcb540c6647754a531e7.tar.gz opensim-SC_OLD-984cf943757b15f05c2cfcb540c6647754a531e7.tar.bz2 opensim-SC_OLD-984cf943757b15f05c2cfcb540c6647754a531e7.tar.xz |
* 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
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index bdede36..9c29338 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -2049,8 +2049,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2049 | } | 2049 | } |
2050 | 2050 | ||
2051 | m_scene.UnlinkSceneObject(objectGroup.UUID, true); | 2051 | m_scene.UnlinkSceneObject(objectGroup.UUID, true); |
2052 | objectGroup.m_isDeleted = true; | 2052 | objectGroup.m_isDeleted = true; |
2053 | objectGroup.m_parts.Clear(); | 2053 | |
2054 | lock (objectGroup.m_parts) | ||
2055 | { | ||
2056 | objectGroup.m_parts.Clear(); | ||
2057 | } | ||
2054 | 2058 | ||
2055 | // Can't do this yet since backup still makes use of the root part without any synchronization | 2059 | // Can't do this yet since backup still makes use of the root part without any synchronization |
2056 | // objectGroup.m_rootPart = null; | 2060 | // objectGroup.m_rootPart = null; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8cd0bf2..8fb94b0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3097,10 +3097,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3097 | ScenePresence sp = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); | 3097 | ScenePresence sp = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); |
3098 | if (sp != null) | 3098 | if (sp != null) |
3099 | client = sp.ControllingClient; | 3099 | client = sp.ControllingClient; |
3100 | |||
3100 | SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target); | 3101 | SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target); |
3102 | |||
3101 | if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0) | 3103 | if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0) |
3102 | return; // Fail silently if attached | 3104 | return; // Fail silently if attached |
3103 | SceneObjectGroup parentPrim = null, childPrim = null; | 3105 | SceneObjectGroup parentPrim = null, childPrim = null; |
3106 | |||
3104 | if (targetPart != null) | 3107 | if (targetPart != null) |
3105 | { | 3108 | { |
3106 | if (parent != 0) { | 3109 | if (parent != 0) { |
@@ -3118,10 +3121,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3118 | // if (uf != (Byte)0) | 3121 | // if (uf != (Byte)0) |
3119 | // parent.RootPart.UpdateFlag = uf; | 3122 | // parent.RootPart.UpdateFlag = uf; |
3120 | } | 3123 | } |
3124 | |||
3121 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); | 3125 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); |
3122 | parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); | 3126 | parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); |
3123 | parentPrim.HasGroupChanged = true; | 3127 | parentPrim.HasGroupChanged = true; |
3124 | parentPrim.ScheduleGroupForFullUpdate(); | 3128 | parentPrim.ScheduleGroupForFullUpdate(); |
3129 | |||
3125 | if (client != null) | 3130 | if (client != null) |
3126 | parentPrim.GetProperties(client); | 3131 | parentPrim.GetProperties(client); |
3127 | 3132 | ||