diff options
author | UbitUmarov | 2016-08-22 07:51:36 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-22 07:51:36 +0100 |
commit | d1e3be1efef53544df4135f5ec1b8911a3c6fb5d (patch) | |
tree | 21438ce8b1cdf92ca0ebd3c9814025694f1bc8e9 | |
parent | remove unnecessary lock (diff) | |
download | opensim-SC_OLD-d1e3be1efef53544df4135f5ec1b8911a3c6fb5d.zip opensim-SC_OLD-d1e3be1efef53544df4135f5ec1b8911a3c6fb5d.tar.gz opensim-SC_OLD-d1e3be1efef53544df4135f5ec1b8911a3c6fb5d.tar.bz2 opensim-SC_OLD-d1e3be1efef53544df4135f5ec1b8911a3c6fb5d.tar.xz |
minor locking issue
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
1 files 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 d460681..3241598 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 | |||
14674 | msAvailable -= m_castRayCalls[i].UsedMs; | 14674 | msAvailable -= m_castRayCalls[i].UsedMs; |
14675 | } | 14675 | } |
14676 | } | 14676 | } |
14677 | } | ||
14678 | 14677 | ||
14679 | // Return failure if not enough available time | 14678 | // Return failure if not enough available time |
14680 | if (msAvailable < m_msMinInCastRay) | 14679 | if (msAvailable < m_msMinInCastRay) |
14681 | { | 14680 | { |
14682 | result.Add(new LSL_Integer(ScriptBaseClass.RCERR_CAST_TIME_EXCEEDED)); | 14681 | result.Add(new LSL_Integer(ScriptBaseClass.RCERR_CAST_TIME_EXCEEDED)); |
14683 | return result; | 14682 | return result; |
14683 | } | ||
14684 | } | 14684 | } |
14685 | 14685 | ||
14686 | // Initialize | 14686 | // Initialize |
@@ -15068,13 +15068,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15068 | 15068 | ||
15069 | // Add to throttle data | 15069 | // Add to throttle data |
15070 | stopWatch.Stop(); | 15070 | stopWatch.Stop(); |
15071 | CastRayCall castRayCall = new CastRayCall(); | ||
15072 | castRayCall.RegionId = regionId; | ||
15073 | castRayCall.UserId = userId; | ||
15074 | castRayCall.CalledMs = calledMs; | ||
15075 | castRayCall.UsedMs = (int)stopWatch.ElapsedMilliseconds; | ||
15076 | lock (m_castRayCalls) | 15071 | lock (m_castRayCalls) |
15077 | { | 15072 | { |
15073 | CastRayCall castRayCall = new CastRayCall(); | ||
15074 | castRayCall.RegionId = regionId; | ||
15075 | castRayCall.UserId = userId; | ||
15076 | castRayCall.CalledMs = calledMs; | ||
15077 | castRayCall.UsedMs = (int)stopWatch.ElapsedMilliseconds; | ||
15078 | m_castRayCalls.Add(castRayCall); | 15078 | m_castRayCalls.Add(castRayCall); |
15079 | } | 15079 | } |
15080 | 15080 | ||