mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking
This commit is contained in:
@@ -526,7 +526,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
group.RootPart.CreateSelected = true;
|
||||
|
||||
if (!m_Scene.Permissions.CanRezObject(
|
||||
group.Children.Count, remoteClient.AgentId, pos)
|
||||
group.PrimCount, remoteClient.AgentId, pos)
|
||||
&& !attachment)
|
||||
{
|
||||
// The client operates in no fail mode. It will
|
||||
@@ -594,7 +594,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
rootPart.Name = item.Name;
|
||||
rootPart.Description = item.Description;
|
||||
|
||||
List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values);
|
||||
List<SceneObjectPart> partList = null;
|
||||
lock (group.Children)
|
||||
partList = new List<SceneObjectPart>(group.Children.Values);
|
||||
|
||||
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
|
||||
if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0)
|
||||
|
||||
Reference in New Issue
Block a user