diff options
author | Melanie | 2012-07-15 22:28:47 +0200 |
---|---|---|
committer | Melanie | 2012-07-15 22:28:47 +0200 |
commit | b130dcea21130b65a3dbe400b0c50e1f5e461972 (patch) | |
tree | 7749b32787ad4cb243f1d13453d4833ca6dcd62d /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |
parent | Save packets received while the client is added and replay them later. (diff) | |
download | opensim-SC-b130dcea21130b65a3dbe400b0c50e1f5e461972.zip opensim-SC-b130dcea21130b65a3dbe400b0c50e1f5e461972.tar.gz opensim-SC-b130dcea21130b65a3dbe400b0c50e1f5e461972.tar.bz2 opensim-SC-b130dcea21130b65a3dbe400b0c50e1f5e461972.tar.xz |
Testing changes and instrumentation
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 34923be..c807260 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -701,10 +701,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
701 | // UseCircuitCode handling | 701 | // UseCircuitCode handling |
702 | if (packet.Type == PacketType.UseCircuitCode) | 702 | if (packet.Type == PacketType.UseCircuitCode) |
703 | { | 703 | { |
704 | object[] array = new object[] { buffer, packet }; | ||
705 | |||
706 | lock (m_pendingCache) | 704 | lock (m_pendingCache) |
705 | { | ||
706 | if (m_pendingCache.Contains(address)) | ||
707 | return; | ||
708 | |||
707 | m_pendingCache.AddOrUpdate(address, new Queue<UDPPacketBuffer>(), 60); | 709 | m_pendingCache.AddOrUpdate(address, new Queue<UDPPacketBuffer>(), 60); |
710 | } | ||
711 | |||
712 | object[] array = new object[] { buffer, packet }; | ||
713 | |||
708 | Util.FireAndForget(HandleUseCircuitCode, array); | 714 | Util.FireAndForget(HandleUseCircuitCode, array); |
709 | 715 | ||
710 | return; | 716 | return; |
@@ -718,10 +724,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
718 | { | 724 | { |
719 | Queue<UDPPacketBuffer> queue; | 725 | Queue<UDPPacketBuffer> queue; |
720 | if (m_pendingCache.TryGetValue(address, out queue)) | 726 | if (m_pendingCache.TryGetValue(address, out queue)) |
727 | { | ||
728 | m_log.DebugFormat("[LLUDPSERVER]: Enqueued a {0} packet into the pending queue", packet.Type); | ||
721 | queue.Enqueue(buffer); | 729 | queue.Enqueue(buffer); |
730 | } | ||
731 | else | ||
732 | { | ||
733 | m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); | ||
734 | } | ||
722 | } | 735 | } |
723 | 736 | ||
724 | // m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); | ||
725 | return; | 737 | return; |
726 | } | 738 | } |
727 | 739 | ||
@@ -964,10 +976,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
964 | lock (m_pendingCache) | 976 | lock (m_pendingCache) |
965 | { | 977 | { |
966 | if (!m_pendingCache.TryGetValue(remoteEndPoint, out queue)) | 978 | if (!m_pendingCache.TryGetValue(remoteEndPoint, out queue)) |
979 | { | ||
980 | m_log.DebugFormat("[LLUDPSERVER]: Client created but no pending queue present"); | ||
967 | return; | 981 | return; |
982 | } | ||
968 | m_pendingCache.Remove(remoteEndPoint); | 983 | m_pendingCache.Remove(remoteEndPoint); |
969 | } | 984 | } |
970 | 985 | ||
986 | m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); | ||
987 | |||
971 | // Reinject queued packets | 988 | // Reinject queued packets |
972 | while(queue.Count > 0) | 989 | while(queue.Count > 0) |
973 | { | 990 | { |