Patch from dslake http://opensimulator.org/mantis/view.php?id=4291 0004291: Inconsistent locking of ODE tainted prims

0.6.8-post-fixes
dslake 2009-10-23 12:12:19 -04:00 committed by Teravus Ovares (Dan Olivares)
parent 71c929137f
commit 8ba3afb59b
1 changed files with 3 additions and 2 deletions

View File

@ -239,6 +239,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private readonly HashSet<OdePrim> _prims = new HashSet<OdePrim>();
private readonly HashSet<OdePrim> _activeprims = new HashSet<OdePrim>();
private readonly HashSet<OdePrim> _taintedPrimH = new HashSet<OdePrim>();
private readonly Object _taintedPrimLock = new Object();
private readonly List<OdePrim> _taintedPrimL = new List<OdePrim>();
private readonly HashSet<OdeCharacter> _taintedActors = new HashSet<OdeCharacter>();
private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>();
@ -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)
{