diff options
author | UbitUmarov | 2012-07-15 23:33:06 +0100 |
---|---|---|
committer | UbitUmarov | 2012-07-15 23:33:06 +0100 |
commit | 15a1ad393c3748c5c911beac981945a9bd8b200d (patch) | |
tree | b43afd5e33b66aec8f186df0c07bf2dd6d4b132a /OpenSim/Region/ClientStack | |
parent | Merge branch 'avination' into ubitwork (diff) | |
parent | Remove instrumentation and fix the message delivery issue (diff) | |
download | opensim-SC-15a1ad393c3748c5c911beac981945a9bd8b200d.zip opensim-SC-15a1ad393c3748c5c911beac981945a9bd8b200d.tar.gz opensim-SC-15a1ad393c3748c5c911beac981945a9bd8b200d.tar.bz2 opensim-SC-15a1ad393c3748c5c911beac981945a9bd8b200d.tar.xz |
Merge branch 'avination' into ubitwork
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index c807260..46337b3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -698,42 +698,46 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
698 | 698 | ||
699 | #region Packet to Client Mapping | 699 | #region Packet to Client Mapping |
700 | 700 | ||
701 | // UseCircuitCode handling | 701 | // If there is already a client for this endpoint, don't process UseCircuitCode |
702 | if (packet.Type == PacketType.UseCircuitCode) | 702 | IClientAPI client = null; |
703 | if (!m_scene.TryGetClient(address, out client)) | ||
703 | { | 704 | { |
704 | lock (m_pendingCache) | 705 | // UseCircuitCode handling |
706 | if (packet.Type == PacketType.UseCircuitCode) | ||
705 | { | 707 | { |
706 | if (m_pendingCache.Contains(address)) | 708 | // And if there is a UseCircuitCode pending, also drop it |
707 | return; | 709 | lock (m_pendingCache) |
710 | { | ||
711 | if (m_pendingCache.Contains(address)) | ||
712 | return; | ||
708 | 713 | ||
709 | m_pendingCache.AddOrUpdate(address, new Queue<UDPPacketBuffer>(), 60); | 714 | m_pendingCache.AddOrUpdate(address, new Queue<UDPPacketBuffer>(), 60); |
710 | } | 715 | } |
711 | 716 | ||
712 | object[] array = new object[] { buffer, packet }; | 717 | object[] array = new object[] { buffer, packet }; |
713 | 718 | ||
714 | Util.FireAndForget(HandleUseCircuitCode, array); | 719 | Util.FireAndForget(HandleUseCircuitCode, array); |
715 | 720 | ||
716 | return; | 721 | return; |
722 | } | ||
717 | } | 723 | } |
718 | 724 | ||
719 | // Determine which agent this packet came from | 725 | // If this is a pending connection, enqueue, don't process yet |
720 | IClientAPI client; | 726 | lock (m_pendingCache) |
721 | if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView)) | ||
722 | { | 727 | { |
723 | lock (m_pendingCache) | 728 | Queue<UDPPacketBuffer> queue; |
729 | if (m_pendingCache.TryGetValue(address, out queue)) | ||
724 | { | 730 | { |
725 | Queue<UDPPacketBuffer> queue; | 731 | //m_log.DebugFormat("[LLUDPSERVER]: Enqueued a {0} packet into the pending queue", packet.Type); |
726 | if (m_pendingCache.TryGetValue(address, out queue)) | 732 | queue.Enqueue(buffer); |
727 | { | 733 | return; |
728 | m_log.DebugFormat("[LLUDPSERVER]: Enqueued a {0} packet into the pending queue", packet.Type); | ||
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 | } | ||
735 | } | 734 | } |
735 | } | ||
736 | 736 | ||
737 | // Determine which agent this packet came from | ||
738 | if (client == null || !(client is LLClientView)) | ||
739 | { | ||
740 | //m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); | ||
737 | return; | 741 | return; |
738 | } | 742 | } |
739 | 743 | ||