* Replace manually zeroing with Array.Clear(). Thanks cmickeyb

This commit is contained in:
Justin Clarke Casey
2008-12-17 17:18:52 +00:00
parent 8e5fe0257c
commit 72ff5322f5
3 changed files with 4 additions and 9 deletions

View File

@@ -331,10 +331,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// loop, since each pass through the loop checks the queue length, we no longer
// need the check on entering the loop
bool qchanged = true;
ResetCounters();
// m_log.Info("[THROTTLE]: Entering Throttle");
while (TotalThrottle.UnderLimit() && qchanged &&
(throttleLoops <= MaxThrottleLoops))
while (TotalThrottle.UnderLimit() && qchanged && throttleLoops <= MaxThrottleLoops)
{
qchanged = false; // We will break out of the loop if no work was accomplished

View File

@@ -195,10 +195,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
// Make sure we are getting zeroes when running off the
// end of grab / degrab packets from old clients
//
int z;
for (z = numBytes ; z < RecvBuffer.Length ; z++)
RecvBuffer[z] = 0;
Array.Clear(RecvBuffer, numBytes, RecvBuffer.Length - numBytes);
int packetEnd = numBytes - 1;
if (proxyPortOffset != 0) packetEnd -= 6;