aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs39
1 files changed, 18 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index c4bc6c8..c09da9b 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -251,27 +251,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
251 { 251 {
252 // Add acks to outgoing packets 252 // Add acks to outgoing packets
253 // 253 //
254 lock(m_PendingAcks) 254 if(m_PendingAcks.Count > 0)
255 { 255 {
256 if(m_PendingAcks.Count > 0) 256 int count = m_PendingAcks.Count;
257 { 257 if(count > 10)
258 int count = m_PendingAcks.Count; 258 count = 10;
259 if(count > 10) 259 packet.Header.AckList = new uint[count];
260 count = 10; 260
261 packet.Header.AckList = new uint[count]; 261 int i = 0;
262 262
263 int i = 0; 263 foreach (uint ack in new List<uint>(m_PendingAcks.Keys))
264 264 {
265 foreach (uint ack in new List<uint>(m_PendingAcks.Keys)) 265 packet.Header.AckList[i] = ack;
266 { 266 i++;
267 packet.Header.AckList[i] = ack; 267 m_PendingAcks.Remove(ack);
268 i++; 268 if (i >= 10) // That is how much space there is
269 m_PendingAcks.Remove(ack); 269 break;
270 if (i >= 10) // That is how much space there is 270 }
271 break; 271 }
272 }
273 }
274 }
275 272
276 packet.TickCount = System.Environment.TickCount; 273 packet.TickCount = System.Environment.TickCount;
277 274