aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-12-17 19:01:47 +0000
committerMelanie Thielker2008-12-17 19:01:47 +0000
commit7ef5a79fef02fd59da6689b8dbcff8db6ab36149 (patch)
tree06170bec0a960497fdb2c86750e6fde32b92c35c /OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
parentMarry AckData to LLQueItem, and store packet data and length there for (diff)
downloadopensim-SC-7ef5a79fef02fd59da6689b8dbcff8db6ab36149.zip
opensim-SC-7ef5a79fef02fd59da6689b8dbcff8db6ab36149.tar.gz
opensim-SC-7ef5a79fef02fd59da6689b8dbcff8db6ab36149.tar.bz2
opensim-SC-7ef5a79fef02fd59da6689b8dbcff8db6ab36149.tar.xz
Change the PacketQueue to use the stored size as well
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs39
1 files changed, 16 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index 2d02dfc..4383493 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -345,9 +345,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
345 LLQueItem qpack = ResendOutgoingPacketQueue.Dequeue(); 345 LLQueItem qpack = ResendOutgoingPacketQueue.Dequeue();
346 346
347 SendQueue.Enqueue(qpack); 347 SendQueue.Enqueue(qpack);
348 int qpackSize = qpack.Packet.ToBytes().Length; 348 TotalThrottle.AddBytes(qpack.Length);
349 TotalThrottle.AddBytes(qpackSize); 349 ResendThrottle.AddBytes(qpack.Length);
350 ResendThrottle.AddBytes(qpackSize);
351 350
352 qchanged = true; 351 qchanged = true;
353 } 352 }
@@ -357,9 +356,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
357 LLQueItem qpack = LandOutgoingPacketQueue.Dequeue(); 356 LLQueItem qpack = LandOutgoingPacketQueue.Dequeue();
358 357
359 SendQueue.Enqueue(qpack); 358 SendQueue.Enqueue(qpack);
360 int qpackSize = qpack.Packet.ToBytes().Length; 359 TotalThrottle.AddBytes(qpack.Length);
361 TotalThrottle.AddBytes(qpackSize); 360 LandThrottle.AddBytes(qpack.Length);
362 LandThrottle.AddBytes(qpackSize);
363 qchanged = true; 361 qchanged = true;
364 } 362 }
365 363
@@ -368,9 +366,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
368 LLQueItem qpack = WindOutgoingPacketQueue.Dequeue(); 366 LLQueItem qpack = WindOutgoingPacketQueue.Dequeue();
369 367
370 SendQueue.Enqueue(qpack); 368 SendQueue.Enqueue(qpack);
371 int qpackSize = qpack.Packet.ToBytes().Length; 369 TotalThrottle.AddBytes(qpack.Length);
372 TotalThrottle.AddBytes(qpackSize); 370 WindThrottle.AddBytes(qpack.Length);
373 WindThrottle.AddBytes(qpackSize);
374 qchanged = true; 371 qchanged = true;
375 } 372 }
376 373
@@ -379,9 +376,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
379 LLQueItem qpack = CloudOutgoingPacketQueue.Dequeue(); 376 LLQueItem qpack = CloudOutgoingPacketQueue.Dequeue();
380 377
381 SendQueue.Enqueue(qpack); 378 SendQueue.Enqueue(qpack);
382 int qpackSize = qpack.Packet.ToBytes().Length; 379 TotalThrottle.AddBytes(qpack.Length);
383 TotalThrottle.AddBytes(qpackSize); 380 CloudThrottle.AddBytes(qpack.Length);
384 CloudThrottle.AddBytes(qpackSize);
385 qchanged = true; 381 qchanged = true;
386 } 382 }
387 383
@@ -399,9 +395,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
399 SendQueue.Enqueue(qpack); 395 SendQueue.Enqueue(qpack);
400 } 396 }
401 397
402 int qpackSize = qpack.Packet.ToBytes().Length; 398 TotalThrottle.AddBytes(qpack.Length);
403 TotalThrottle.AddBytes(qpackSize); 399 TaskThrottle.AddBytes(qpack.Length);
404 TaskThrottle.AddBytes(qpackSize);
405 qchanged = true; 400 qchanged = true;
406 } 401 }
407 402
@@ -410,9 +405,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
410 LLQueItem qpack = TextureOutgoingPacketQueue.Dequeue(); 405 LLQueItem qpack = TextureOutgoingPacketQueue.Dequeue();
411 406
412 SendQueue.Enqueue(qpack); 407 SendQueue.Enqueue(qpack);
413 int qpackSize = qpack.Packet.ToBytes().Length; 408 TotalThrottle.AddBytes(qpack.Length);
414 TotalThrottle.AddBytes(qpackSize); 409 TextureThrottle.AddBytes(qpack.Length);
415 TextureThrottle.AddBytes(qpackSize);
416 qchanged = true; 410 qchanged = true;
417 } 411 }
418 412
@@ -421,9 +415,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
421 LLQueItem qpack = AssetOutgoingPacketQueue.Dequeue(); 415 LLQueItem qpack = AssetOutgoingPacketQueue.Dequeue();
422 416
423 SendQueue.Enqueue(qpack); 417 SendQueue.Enqueue(qpack);
424 int qpackSize = qpack.Packet.ToBytes().Length; 418 TotalThrottle.AddBytes(qpack.Length);
425 TotalThrottle.AddBytes(qpackSize); 419 AssetThrottle.AddBytes(qpack.Length);
426 AssetThrottle.AddBytes(qpackSize);
427 qchanged = true; 420 qchanged = true;
428 } 421 }
429 } 422 }
@@ -451,8 +444,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
451 try 444 try
452 { 445 {
453 Monitor.Enter(this); 446 Monitor.Enter(this);
454 throttle.AddBytes(item.Packet.ToBytes().Length); 447 throttle.AddBytes(item.Length);
455 TotalThrottle.AddBytes(item.Packet.ToBytes().Length); 448 TotalThrottle.AddBytes(item.Length);
456 SendQueue.Enqueue(item); 449 SendQueue.Enqueue(item);
457 } 450 }
458 catch (Exception e) 451 catch (Exception e)