aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorDiva Canto2011-02-09 08:06:20 -0800
committerDiva Canto2011-02-09 08:06:20 -0800
commit473fac4dc71858139bd44c1e9ce4fd03d9d1bd91 (patch)
treefd14ec6eff2357c7964899a5a6759a04d4583160 /OpenSim/Region/ClientStack/LindenUDP
parentDon't build strings unless we're in emergency debugging. (diff)
downloadopensim-SC-473fac4dc71858139bd44c1e9ce4fd03d9d1bd91.zip
opensim-SC-473fac4dc71858139bd44c1e9ce4fd03d9d1bd91.tar.gz
opensim-SC-473fac4dc71858139bd44c1e9ce4fd03d9d1bd91.tar.bz2
opensim-SC-473fac4dc71858139bd44c1e9ce4fd03d9d1bd91.tar.xz
Detect negative dripAmounts in TokenBuckets. These negatives result from overflown integer operations. Also added Total to the scene throttles in show throttles.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
index bdbd284..dd52683 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
@@ -207,6 +207,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
207 207
208 int dripAmount = deltaMS * tokensPerMS; 208 int dripAmount = deltaMS * tokensPerMS;
209 209
210 if (dripAmount < 0)
211 Console.WriteLine("MAY DAY MAY DAY! Drip amount is " + dripAmount + ". This should not happen");
212
210 content = Math.Min(content + dripAmount, maxBurst); 213 content = Math.Min(content + dripAmount, maxBurst);
211 lastDrip = now; 214 lastDrip = now;
212 215