Ooops fix bad locking
parent
f474c10f71
commit
27f5248d9f
|
@ -97,6 +97,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// conditions can occur.
|
||||
/// </remarks>
|
||||
private Object m_updateLock = new Object();
|
||||
private Object m_linkLock = new Object();
|
||||
private System.Threading.ReaderWriterLockSlim m_scenePresencesLock;
|
||||
private System.Threading.ReaderWriterLockSlim m_scenePartsLock;
|
||||
|
||||
|
@ -633,10 +634,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// Process all pending updates
|
||||
/// </summary>
|
||||
protected internal void UpdateObjectGroups()
|
||||
{
|
||||
if (!Monitor.TryEnter(m_updateLock))
|
||||
return;
|
||||
try
|
||||
{
|
||||
Dictionary<UUID, SceneObjectGroup> updates;
|
||||
// Get the current list of updates and clear the list before iterating
|
||||
|
@ -665,11 +662,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
updates = null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(m_updateLock);
|
||||
}
|
||||
}
|
||||
|
||||
protected internal void AddPhysicalPrim(int number)
|
||||
{
|
||||
|
@ -1704,11 +1696,16 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
protected internal void UpdatePrimFlags(
|
||||
uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, ExtraPhysicsData PhysData, IClientAPI remoteClient)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.Permissions.CanEditObject(group, remoteClient))
|
||||
{
|
||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||
if(part == null)
|
||||
return;
|
||||
SceneObjectGroup group = part.ParentGroup;
|
||||
if(group == null || group.IsDeleted)
|
||||
return;
|
||||
|
||||
if (!m_parentScene.Permissions.CanEditObject(group, remoteClient))
|
||||
return;
|
||||
|
||||
// VolumeDetect can't be set via UI and will always be off when a change is made there
|
||||
// now only change volume dtc if phantom off
|
||||
|
||||
|
@ -1724,15 +1721,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
group.UpdateFlags(UsePhysics, SetTemporary, SetPhantom, vdtc);
|
||||
}
|
||||
else
|
||||
{
|
||||
SceneObjectPart part = group.GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateExtraPhysics(PhysData);
|
||||
if (remoteClient != null)
|
||||
remoteClient.SendPartPhysicsProprieties(part);
|
||||
}
|
||||
}
|
||||
|
||||
if (wantedPhys != group.UsesPhysics && remoteClient != null)
|
||||
{
|
||||
|
@ -1744,8 +1737,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
group.RootPart.ScheduleFullUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -1899,7 +1890,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (parentGroup.OwnerID == parentGroup.GroupID)
|
||||
return;
|
||||
|
||||
Monitor.Enter(m_updateLock);
|
||||
Monitor.Enter(m_linkLock);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1962,7 +1953,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
parentGroup.HasGroupChanged = true;
|
||||
parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true);
|
||||
parentGroup.ScheduleGroupForFullAnimUpdate();
|
||||
Monitor.Exit(m_updateLock);
|
||||
Monitor.Exit(m_linkLock);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1972,7 +1963,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="prims"></param>
|
||||
protected internal void DelinkObjects(List<SceneObjectPart> prims)
|
||||
{
|
||||
Monitor.Enter(m_updateLock);
|
||||
Monitor.Enter(m_linkLock);
|
||||
try
|
||||
{
|
||||
List<SceneObjectPart> childParts = new List<SceneObjectPart>();
|
||||
|
@ -2090,7 +2081,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(m_updateLock);
|
||||
Monitor.Exit(m_linkLock);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue