From b130dcea21130b65a3dbe400b0c50e1f5e461972 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 15 Jul 2012 22:28:47 +0200 Subject: Testing changes and instrumentation --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') 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 // UseCircuitCode handling if (packet.Type == PacketType.UseCircuitCode) { - object[] array = new object[] { buffer, packet }; - lock (m_pendingCache) + { + if (m_pendingCache.Contains(address)) + return; + m_pendingCache.AddOrUpdate(address, new Queue(), 60); + } + + object[] array = new object[] { buffer, packet }; + Util.FireAndForget(HandleUseCircuitCode, array); return; @@ -718,10 +724,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP { Queue queue; if (m_pendingCache.TryGetValue(address, out queue)) + { + m_log.DebugFormat("[LLUDPSERVER]: Enqueued a {0} packet into the pending queue", packet.Type); queue.Enqueue(buffer); + } + else + { + m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); + } } -// m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); return; } @@ -964,10 +976,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP lock (m_pendingCache) { if (!m_pendingCache.TryGetValue(remoteEndPoint, out queue)) + { + m_log.DebugFormat("[LLUDPSERVER]: Client created but no pending queue present"); return; + } m_pendingCache.Remove(remoteEndPoint); } + m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); + // Reinject queued packets while(queue.Count > 0) { -- cgit v1.1