aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
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
parentDon't build strings unless we're in emergency debugging. (diff)
downloadopensim-SC_OLD-473fac4dc71858139bd44c1e9ce4fd03d9d1bd91.zip
opensim-SC_OLD-473fac4dc71858139bd44c1e9ce4fd03d9d1bd91.tar.gz
opensim-SC_OLD-473fac4dc71858139bd44c1e9ce4fd03d9d1bd91.tar.bz2
opensim-SC_OLD-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')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs3
-rw-r--r--OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs2
2 files changed, 4 insertions, 1 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
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 53cebb2..dfeecb1 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -361,7 +361,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
361 ThrottleRates throttleRates = udpServer.ThrottleRates; 361 ThrottleRates throttleRates = udpServer.ThrottleRates;
362 report.AppendFormat( 362 report.AppendFormat(
363 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", 363 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}",
364 "n/a", 364 (throttleRates.Total * 8) / 1000,
365 (throttleRates.ResendLimit * 8) / 1000, 365 (throttleRates.ResendLimit * 8) / 1000,
366 (throttleRates.LandLimit * 8) / 1000, 366 (throttleRates.LandLimit * 8) / 1000,
367 (throttleRates.WindLimit * 8) / 1000, 367 (throttleRates.WindLimit * 8) / 1000,