diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Framework/BasicDOSProtector.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Framework/BasicDOSProtector.cs')
-rw-r--r-- | OpenSim/Framework/BasicDOSProtector.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Framework/BasicDOSProtector.cs b/OpenSim/Framework/BasicDOSProtector.cs index 89bfa94..f1ff18f 100644 --- a/OpenSim/Framework/BasicDOSProtector.cs +++ b/OpenSim/Framework/BasicDOSProtector.cs | |||
@@ -31,7 +31,7 @@ using log4net; | |||
31 | 31 | ||
32 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
33 | { | 33 | { |
34 | 34 | ||
35 | public class BasicDOSProtector | 35 | public class BasicDOSProtector |
36 | { | 36 | { |
37 | public enum ThrottleAction | 37 | public enum ThrottleAction |
@@ -43,7 +43,7 @@ namespace OpenSim.Framework | |||
43 | private readonly BasicDosProtectorOptions _options; | 43 | private readonly BasicDosProtectorOptions _options; |
44 | private readonly Dictionary<string, CircularBuffer<int>> _deeperInspection; // per client request checker | 44 | private readonly Dictionary<string, CircularBuffer<int>> _deeperInspection; // per client request checker |
45 | private readonly Dictionary<string, int> _tempBlocked; // blocked list | 45 | private readonly Dictionary<string, int> _tempBlocked; // blocked list |
46 | private readonly Dictionary<string, int> _sessions; | 46 | private readonly Dictionary<string, int> _sessions; |
47 | private readonly System.Timers.Timer _forgetTimer; // Cleanup timer | 47 | private readonly System.Timers.Timer _forgetTimer; // Cleanup timer |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | private readonly System.Threading.ReaderWriterLockSlim _blockLockSlim = new System.Threading.ReaderWriterLockSlim(); | 49 | private readonly System.Threading.ReaderWriterLockSlim _blockLockSlim = new System.Threading.ReaderWriterLockSlim(); |
@@ -133,7 +133,7 @@ namespace OpenSim.Framework | |||
133 | else | 133 | else |
134 | throw new System.Security.SecurityException("Throttled"); | 134 | throw new System.Security.SecurityException("Throttled"); |
135 | } | 135 | } |
136 | 136 | ||
137 | _blockLockSlim.ExitReadLock(); | 137 | _blockLockSlim.ExitReadLock(); |
138 | 138 | ||
139 | lock (_generalRequestTimes) | 139 | lock (_generalRequestTimes) |
@@ -169,10 +169,10 @@ namespace OpenSim.Framework | |||
169 | _blockLockSlim.ExitWriteLock(); | 169 | _blockLockSlim.ExitWriteLock(); |
170 | 170 | ||
171 | } | 171 | } |
172 | 172 | ||
173 | 173 | ||
174 | } | 174 | } |
175 | else | 175 | else |
176 | ProcessConcurrency(key, endpoint); | 176 | ProcessConcurrency(key, endpoint); |
177 | } | 177 | } |
178 | if (_generalRequestTimes.Size == _generalRequestTimes.Capacity && | 178 | if (_generalRequestTimes.Size == _generalRequestTimes.Capacity && |
@@ -194,7 +194,7 @@ namespace OpenSim.Framework | |||
194 | _sessionLockSlim.EnterWriteLock(); | 194 | _sessionLockSlim.EnterWriteLock(); |
195 | if (_sessions.ContainsKey(key)) | 195 | if (_sessions.ContainsKey(key)) |
196 | _sessions[key] = _sessions[key] + 1; | 196 | _sessions[key] = _sessions[key] + 1; |
197 | else | 197 | else |
198 | _sessions.Add(key,1); | 198 | _sessions.Add(key,1); |
199 | _sessionLockSlim.ExitWriteLock(); | 199 | _sessionLockSlim.ExitWriteLock(); |
200 | } | 200 | } |
@@ -209,7 +209,7 @@ namespace OpenSim.Framework | |||
209 | } | 209 | } |
210 | else | 210 | else |
211 | _sessions.Add(key, 1); | 211 | _sessions.Add(key, 1); |
212 | 212 | ||
213 | _sessionLockSlim.ExitWriteLock(); | 213 | _sessionLockSlim.ExitWriteLock(); |
214 | } | 214 | } |
215 | 215 | ||