diff options
author | Justin Clark-Casey (justincc) | 2010-08-26 00:08:53 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-26 00:08:53 +0100 |
commit | 8031f8ec09df4f654c86a9c7bc498664f7b9d9dc (patch) | |
tree | d6a6da4d448b9bc11ff8d1078b9be089b9872151 /OpenSim/Region/CoreModules/Framework/InventoryAccess | |
parent | minor: remove mono compiler warning (diff) | |
download | opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.zip opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.gz opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.bz2 opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.xz |
Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index eef0c73..6decf54 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -526,7 +526,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
526 | group.RootPart.CreateSelected = true; | 526 | group.RootPart.CreateSelected = true; |
527 | 527 | ||
528 | if (!m_Scene.Permissions.CanRezObject( | 528 | if (!m_Scene.Permissions.CanRezObject( |
529 | group.Children.Count, remoteClient.AgentId, pos) | 529 | group.PrimCount, remoteClient.AgentId, pos) |
530 | && !attachment) | 530 | && !attachment) |
531 | { | 531 | { |
532 | // The client operates in no fail mode. It will | 532 | // The client operates in no fail mode. It will |
@@ -594,7 +594,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
594 | rootPart.Name = item.Name; | 594 | rootPart.Name = item.Name; |
595 | rootPart.Description = item.Description; | 595 | rootPart.Description = item.Description; |
596 | 596 | ||
597 | List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values); | 597 | List<SceneObjectPart> partList = null; |
598 | lock (group.Children) | ||
599 | partList = new List<SceneObjectPart>(group.Children.Values); | ||
598 | 600 | ||
599 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); | 601 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); |
600 | if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) | 602 | if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) |