From d1e3be1efef53544df4135f5ec1b8911a3c6fb5d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 22 Aug 2016 07:51:36 +0100 Subject: [PATCH] minor locking issue --- .../Shared/Api/Implementation/LSL_Api.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d46068172e..3241598b89 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -14674,13 +14674,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api msAvailable -= m_castRayCalls[i].UsedMs; } } - } - // Return failure if not enough available time - if (msAvailable < m_msMinInCastRay) - { - result.Add(new LSL_Integer(ScriptBaseClass.RCERR_CAST_TIME_EXCEEDED)); - return result; + // Return failure if not enough available time + if (msAvailable < m_msMinInCastRay) + { + result.Add(new LSL_Integer(ScriptBaseClass.RCERR_CAST_TIME_EXCEEDED)); + return result; + } } // Initialize @@ -15068,13 +15068,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Add to throttle data stopWatch.Stop(); - CastRayCall castRayCall = new CastRayCall(); - castRayCall.RegionId = regionId; - castRayCall.UserId = userId; - castRayCall.CalledMs = calledMs; - castRayCall.UsedMs = (int)stopWatch.ElapsedMilliseconds; lock (m_castRayCalls) { + CastRayCall castRayCall = new CastRayCall(); + castRayCall.RegionId = regionId; + castRayCall.UserId = userId; + castRayCall.CalledMs = calledMs; + castRayCall.UsedMs = (int)stopWatch.ElapsedMilliseconds; m_castRayCalls.Add(castRayCall); }