diff options
author | lbsa71 | 2008-01-16 12:33:02 +0000 |
---|---|---|
committer | lbsa71 | 2008-01-16 12:33:02 +0000 |
commit | f2ca9c1d052bfc6a16fc399e2fe219da77bbcf57 (patch) | |
tree | f7b01003e3fa36cab81fd84bdee5f14855a38106 /OpenSim/Region | |
parent | * More work on getting the database framework to actually work (diff) | |
download | opensim-SC-f2ca9c1d052bfc6a16fc399e2fe219da77bbcf57.zip opensim-SC-f2ca9c1d052bfc6a16fc399e2fe219da77bbcf57.tar.gz opensim-SC-f2ca9c1d052bfc6a16fc399e2fe219da77bbcf57.tar.bz2 opensim-SC-f2ca9c1d052bfc6a16fc399e2fe219da77bbcf57.tar.xz |
* Reverted bugfx that really should go into separate commit
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index d6c9d1d..e74aee7 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -416,7 +416,7 @@ namespace OpenSim.Region.ClientStack | |||
416 | { | 416 | { |
417 | // this will normally trigger at least one packet (ping response) | 417 | // this will normally trigger at least one packet (ping response) |
418 | SendStartPingCheck(0); | 418 | SendStartPingCheck(0); |
419 | 419 | ||
420 | } | 420 | } |
421 | } | 421 | } |
422 | else | 422 | else |
@@ -424,7 +424,7 @@ namespace OpenSim.Region.ClientStack | |||
424 | // Something received in the meantime - we can reset the counters | 424 | // Something received in the meantime - we can reset the counters |
425 | m_probesWithNoIngressPackets = 0; | 425 | m_probesWithNoIngressPackets = 0; |
426 | m_lastPacketsReceived = m_packetsReceived; | 426 | m_lastPacketsReceived = m_packetsReceived; |
427 | 427 | ||
428 | } | 428 | } |
429 | } | 429 | } |
430 | 430 | ||
@@ -2311,7 +2311,7 @@ namespace OpenSim.Region.ClientStack | |||
2311 | if (Pack.Header.Reliable) //DIRTY HACK | 2311 | if (Pack.Header.Reliable) //DIRTY HACK |
2312 | { | 2312 | { |
2313 | AddAck(Pack); // this adds the need to ack this packet later | 2313 | AddAck(Pack); // this adds the need to ack this packet later |
2314 | 2314 | ||
2315 | 2315 | ||
2316 | if (Pack.Type != PacketType.PacketAck && Pack.Type != PacketType.LogoutRequest) | 2316 | if (Pack.Type != PacketType.PacketAck && Pack.Type != PacketType.LogoutRequest) |
2317 | { | 2317 | { |
@@ -2355,15 +2355,10 @@ namespace OpenSim.Region.ClientStack | |||
2355 | { | 2355 | { |
2356 | lock (m_needAck) | 2356 | lock (m_needAck) |
2357 | { | 2357 | { |
2358 | foreach (uint ackedPacketId in NewPack.Header.AckList) | 2358 | foreach (uint ack in NewPack.Header.AckList) |
2359 | { | 2359 | { |
2360 | Packet ackedPacket; | 2360 | m_unAckedBytes -= m_needAck[ack].ToBytes().Length; |
2361 | 2361 | m_needAck.Remove(ack); | |
2362 | if (m_needAck.TryGetValue(ackedPacketId, out ackedPacket)) | ||
2363 | { | ||
2364 | m_unAckedBytes -= ackedPacket.ToBytes().Length; | ||
2365 | m_needAck.Remove(ackedPacketId); | ||
2366 | } | ||
2367 | } | 2362 | } |
2368 | } | 2363 | } |
2369 | } | 2364 | } |
@@ -2378,12 +2373,18 @@ namespace OpenSim.Region.ClientStack | |||
2378 | { | 2373 | { |
2379 | foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets) | 2374 | foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets) |
2380 | { | 2375 | { |
2381 | uint ackedPackId = block.ID; | 2376 | if (m_needAck.ContainsKey(block.ID)) |
2382 | Packet ackedPacket; | ||
2383 | if (m_needAck.TryGetValue(ackedPackId, out ackedPacket)) | ||
2384 | { | 2377 | { |
2385 | m_unAckedBytes -= ackedPacket.ToBytes().Length; | 2378 | try |
2386 | m_needAck.Remove(ackedPackId); | 2379 | { |
2380 | m_unAckedBytes -= m_needAck[block.ID].ToBytes().Length; | ||
2381 | m_needAck.Remove(block.ID); | ||
2382 | } | ||
2383 | catch (System.Collections.Generic.KeyNotFoundException) | ||
2384 | { | ||
2385 | // Did another packet come in with the ack already? | ||
2386 | // apparently so! | ||
2387 | } | ||
2387 | } | 2388 | } |
2388 | } | 2389 | } |
2389 | } | 2390 | } |
@@ -2499,11 +2500,11 @@ namespace OpenSim.Region.ClientStack | |||
2499 | 2500 | ||
2500 | protected void AckTimer_Elapsed(object sender, ElapsedEventArgs ea) | 2501 | protected void AckTimer_Elapsed(object sender, ElapsedEventArgs ea) |
2501 | { | 2502 | { |
2502 | 2503 | ||
2503 | SendAcks(); | 2504 | SendAcks(); |
2504 | ResendUnacked(); | 2505 | ResendUnacked(); |
2505 | SendPacketStats(); | 2506 | SendPacketStats(); |
2506 | 2507 | ||
2507 | } | 2508 | } |
2508 | 2509 | ||
2509 | protected void SendPacketStats() | 2510 | protected void SendPacketStats() |