aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-17 17:18:52 +0000
committerJustin Clarke Casey2008-12-17 17:18:52 +0000
commit72ff5322f5e0aa687a624ca726a0f4b613e51923 (patch)
tree1498d1af96da1e2dee3ab37db872bad03f4c66b6 /OpenSim
parentMantis #2850 (diff)
downloadopensim-SC-72ff5322f5e0aa687a624ca726a0f4b613e51923.zip
opensim-SC-72ff5322f5e0aa687a624ca726a0f4b613e51923.tar.gz
opensim-SC-72ff5322f5e0aa687a624ca726a0f4b613e51923.tar.bz2
opensim-SC-72ff5322f5e0aa687a624ca726a0f4b613e51923.tar.xz
* Replace manually zeroing with Array.Clear(). Thanks cmickeyb
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/PacketPool.cs4
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs4
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs5
3 files changed, 4 insertions, 9 deletions
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs
index e24da42..9994fac 100644
--- a/OpenSim/Framework/PacketPool.cs
+++ b/OpenSim/Framework/PacketPool.cs
@@ -115,9 +115,7 @@ namespace OpenSim.Framework
115 { 115 {
116 PacketType type = GetType(bytes); 116 PacketType type = GetType(bytes);
117 117
118 int z; 118 Array.Clear(zeroBuffer, 0, zeroBuffer.Length);
119 for (z = 0 ; z < zeroBuffer.Length ; z++)
120 zeroBuffer[z] = 0;
121 119
122 int i = 0; 120 int i = 0;
123 Packet packet = GetPacket(type); 121 Packet packet = GetPacket(type);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index a8785a6..3ce71dc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -331,10 +331,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
331 // loop, since each pass through the loop checks the queue length, we no longer 331 // loop, since each pass through the loop checks the queue length, we no longer
332 // need the check on entering the loop 332 // need the check on entering the loop
333 bool qchanged = true; 333 bool qchanged = true;
334
334 ResetCounters(); 335 ResetCounters();
335 // m_log.Info("[THROTTLE]: Entering Throttle"); 336 // m_log.Info("[THROTTLE]: Entering Throttle");
336 while (TotalThrottle.UnderLimit() && qchanged && 337 while (TotalThrottle.UnderLimit() && qchanged && throttleLoops <= MaxThrottleLoops)
337 (throttleLoops <= MaxThrottleLoops))
338 { 338 {
339 qchanged = false; // We will break out of the loop if no work was accomplished 339 qchanged = false; // We will break out of the loop if no work was accomplished
340 340
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 09b9ac9..2daf425 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -195,10 +195,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
195 { 195 {
196 // Make sure we are getting zeroes when running off the 196 // Make sure we are getting zeroes when running off the
197 // end of grab / degrab packets from old clients 197 // end of grab / degrab packets from old clients
198 // 198 Array.Clear(RecvBuffer, numBytes, RecvBuffer.Length - numBytes);
199 int z;
200 for (z = numBytes ; z < RecvBuffer.Length ; z++)
201 RecvBuffer[z] = 0;
202 199
203 int packetEnd = numBytes - 1; 200 int packetEnd = numBytes - 1;
204 if (proxyPortOffset != 0) packetEnd -= 6; 201 if (proxyPortOffset != 0) packetEnd -= 6;