From 8ba3afb59bc31986b0834a98a161c17dedd03487 Mon Sep 17 00:00:00 2001 From: dslake Date: Fri, 23 Oct 2009 12:12:19 -0400 Subject: Patch from dslake http://opensimulator.org/mantis/view.php?id=4291 0004291: Inconsistent locking of ODE tainted prims --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 0a065be..f979ce3 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -239,6 +239,7 @@ namespace OpenSim.Region.Physics.OdePlugin private readonly HashSet _prims = new HashSet(); private readonly HashSet _activeprims = new HashSet(); private readonly HashSet _taintedPrimH = new HashSet(); + private readonly Object _taintedPrimLock = new Object(); private readonly List _taintedPrimL = new List(); private readonly HashSet _taintedActors = new HashSet(); private readonly List _perloopContact = new List(); @@ -2572,7 +2573,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (prim is OdePrim) { OdePrim taintedprim = ((OdePrim) prim); - lock (_taintedPrimH) + lock (_taintedPrimLock) { if (!(_taintedPrimH.Contains(taintedprim))) { @@ -2700,7 +2701,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Modify other objects in the scene. processedtaints = false; - lock (_taintedPrimL) + lock (_taintedPrimLock) { foreach (OdePrim prim in _taintedPrimL) { -- cgit v1.1