aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorDiva Canto2011-02-09 08:35:36 -0800
committerDiva Canto2011-02-09 08:35:36 -0800
commit830fee145d8e8fabc32365ee6f04732d4c85b1e3 (patch)
treea844aaea30a9407e583291fb4f3a12208cde7ca2 /OpenSim/Region/ClientStack
parentRevert "Don't build strings unless we're in emergency debugging." (diff)
downloadopensim-SC_OLD-830fee145d8e8fabc32365ee6f04732d4c85b1e3.zip
opensim-SC_OLD-830fee145d8e8fabc32365ee6f04732d4c85b1e3.tar.gz
opensim-SC_OLD-830fee145d8e8fabc32365ee6f04732d4c85b1e3.tar.bz2
opensim-SC_OLD-830fee145d8e8fabc32365ee6f04732d4c85b1e3.tar.xz
Revert "Brute-force debug -- mantis #5365"
This reverts commit 585473aade100c3ffeef27e0c8e6b6c8c09d0109.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs18
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs5
2 files changed, 3 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 2d58b94..65a8fe3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -463,13 +463,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
463 bool packetSent = false; 463 bool packetSent = false;
464 ThrottleOutPacketTypeFlags emptyCategories = 0; 464 ThrottleOutPacketTypeFlags emptyCategories = 0;
465 465
466 string queueDebugOutput = String.Empty; // Serious debug business 466 //string queueDebugOutput = String.Empty; // Serious debug business
467 467
468 for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++) 468 for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++)
469 { 469 {
470 bucket = m_throttleCategories[i]; 470 bucket = m_throttleCategories[i];
471 if (i == 4) 471 //queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
472 queueDebugOutput += m_packetOutboxes[i].Count + " "; // Serious debug business
473 472
474 if (m_nextPackets[i] != null) 473 if (m_nextPackets[i] != null)
475 { 474 {
@@ -477,17 +476,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
477 // leaving a dequeued packet still waiting to be sent out. Try to 476 // leaving a dequeued packet still waiting to be sent out. Try to
478 // send it again 477 // send it again
479 OutgoingPacket nextPacket = m_nextPackets[i]; 478 OutgoingPacket nextPacket = m_nextPackets[i];
480 if (i == 4) queueDebugOutput += "m_nextPackets[i] != null, " + nextPacket.Buffer.DataLength;
481 if (bucket.RemoveTokens(nextPacket.Buffer.DataLength)) 479 if (bucket.RemoveTokens(nextPacket.Buffer.DataLength))
482 { 480 {
483 if (i == 4) queueDebugOutput += " removed tokens ";
484 // Send the packet 481 // Send the packet
485 m_udpServer.SendPacketFinal(nextPacket); 482 m_udpServer.SendPacketFinal(nextPacket);
486 m_nextPackets[i] = null; 483 m_nextPackets[i] = null;
487 packetSent = true; 484 packetSent = true;
488 } 485 }
489 else
490 if (i == 4) queueDebugOutput += " did not remove tokens ";
491 } 486 }
492 else 487 else
493 { 488 {
@@ -496,7 +491,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
496 queue = m_packetOutboxes[i]; 491 queue = m_packetOutboxes[i];
497 if (queue.Dequeue(out packet)) 492 if (queue.Dequeue(out packet))
498 { 493 {
499 if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq ok " + packet.Buffer.DataLength;
500 // A packet was pulled off the queue. See if we have 494 // A packet was pulled off the queue. See if we have
501 // enough tokens in the bucket to send it out 495 // enough tokens in the bucket to send it out
502 if (bucket.RemoveTokens(packet.Buffer.DataLength)) 496 if (bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -504,13 +498,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
504 // Send the packet 498 // Send the packet
505 m_udpServer.SendPacketFinal(packet); 499 m_udpServer.SendPacketFinal(packet);
506 packetSent = true; 500 packetSent = true;
507 if (i == 4) queueDebugOutput += " removed tokens ";
508 } 501 }
509 else 502 else
510 { 503 {
511 // Save the dequeued packet for the next iteration 504 // Save the dequeued packet for the next iteration
512 m_nextPackets[i] = packet; 505 m_nextPackets[i] = packet;
513 if (i == 4) queueDebugOutput += " did not remove tokens ";
514 } 506 }
515 507
516 // If the queue is empty after this dequeue, fire the queue 508 // If the queue is empty after this dequeue, fire the queue
@@ -521,21 +513,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
521 } 513 }
522 else 514 else
523 { 515 {
524 if (i == 4) queueDebugOutput += "m_nextPackets[i] == null, dq nok ";
525 // No packets in this queue. Fire the queue empty callback 516 // No packets in this queue. Fire the queue empty callback
526 // if it has not been called recently 517 // if it has not been called recently
527 emptyCategories |= CategoryToFlag(i); 518 emptyCategories |= CategoryToFlag(i);
528 } 519 }
529 } 520 }
530
531 } 521 }
532 522
533 if (emptyCategories != 0) 523 if (emptyCategories != 0)
534 BeginFireQueueEmpty(emptyCategories); 524 BeginFireQueueEmpty(emptyCategories);
535 525
536 if (m_udpServer.EmergencyMonitoring) 526 //m_log.Info("[LLUDPCLIENT]: Queues: " + queueDebugOutput); // Serious debug business
537 m_log.Info("[LLUDPCLIENT]: Queues: " + queueDebugOutput); // Serious debug business
538
539 return packetSent; 527 return packetSent;
540 } 528 }
541 529
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 922e2bc..04fec95 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -1133,11 +1133,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1133 private int npacksSent = 0; 1133 private int npacksSent = 0;
1134 private int npackNotSent = 0; 1134 private int npackNotSent = 0;
1135 1135
1136 public bool EmergencyMonitoring
1137 {
1138 get { return m_scene.EmergencyMonitoring; }
1139 }
1140
1141 private void MonitoredClientOutgoingPacketHandler(IClientAPI client) 1136 private void MonitoredClientOutgoingPacketHandler(IClientAPI client)
1142 { 1137 {
1143 nticks++; 1138 nticks++;