aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorUbitUmarov2014-09-14 02:28:42 +0100
committerUbitUmarov2014-09-14 02:28:42 +0100
commit3d9f25a19dda7c54ae50fd9b4da38247371018f3 (patch)
tree958d127b64198db5443cafba98e60366c129e8b3 /OpenSim/Region/ClientStack
parentMerge branch 'master' into ubitworkmaster (diff)
downloadopensim-SC_OLD-3d9f25a19dda7c54ae50fd9b4da38247371018f3.zip
opensim-SC_OLD-3d9f25a19dda7c54ae50fd9b4da38247371018f3.tar.gz
opensim-SC_OLD-3d9f25a19dda7c54ae50fd9b4da38247371018f3.tar.bz2
opensim-SC_OLD-3d9f25a19dda7c54ae50fd9b4da38247371018f3.tar.xz
revert changes to m_pendingCache and remove client close if there is no
SP, as requested
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs35
1 files changed, 14 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 18d5606..d811b64 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -308,8 +308,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
308 308
309 309
310 310
311// private ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>> m_pendingCache = new ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>>(); 311 private ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>> m_pendingCache = new ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>>();
312 private Dictionary<IPEndPoint, Queue<UDPPacketBuffer>> m_pendingCache = new Dictionary<IPEndPoint, Queue<UDPPacketBuffer>>(); 312
313 /// <summary> 313 /// <summary>
314 /// Event used to signal when queued packets are available for sending. 314 /// Event used to signal when queued packets are available for sending.
315 /// </summary> 315 /// </summary>
@@ -1416,12 +1416,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1416 // And if there is a UseCircuitCode pending, also drop it 1416 // And if there is a UseCircuitCode pending, also drop it
1417 lock (m_pendingCache) 1417 lock (m_pendingCache)
1418 { 1418 {
1419// if (m_pendingCache.Contains(endPoint)) 1419 if (m_pendingCache.Contains(endPoint))
1420 if (m_pendingCache.ContainsKey(endPoint))
1421 return; 1420 return;
1422 1421
1423// m_pendingCache.AddOrUpdate(endPoint, new Queue<UDPPacketBuffer>(), 60); 1422 m_pendingCache.AddOrUpdate(endPoint, new Queue<UDPPacketBuffer>(), 60);
1424 m_pendingCache.Add(endPoint, new Queue<UDPPacketBuffer>());
1425 } 1423 }
1426 1424
1427 // We need to copy the endpoint so that it doesn't get changed when another thread reuses the 1425 // We need to copy the endpoint so that it doesn't get changed when another thread reuses the
@@ -1767,7 +1765,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1767 uccp.CircuitCode.SessionID, 1765 uccp.CircuitCode.SessionID,
1768 endPoint, 1766 endPoint,
1769 sessionInfo); 1767 sessionInfo);
1770 1768
1769 // Now we know we can handle more data
1770 Thread.Sleep(200);
1771
1771 // Obtain the pending queue and remove it from the cache 1772 // Obtain the pending queue and remove it from the cache
1772 Queue<UDPPacketBuffer> queue = null; 1773 Queue<UDPPacketBuffer> queue = null;
1773 1774
@@ -1785,17 +1786,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1785 m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); 1786 m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count);
1786 1787
1787 // Reinject queued packets 1788 // Reinject queued packets
1788 if (queue != null) 1789 while (queue.Count > 0)
1789 { 1790 {
1790 while (queue.Count > 0) 1791 UDPPacketBuffer buf = queue.Dequeue();
1791 { 1792 PacketReceived(buf);
1792 UDPPacketBuffer buf = queue.Dequeue();
1793 PacketReceived(buf);
1794 }
1795
1796 queue = null;
1797 } 1793 }
1798 1794
1795 queue = null;
1796
1799 // Send ack straight away to let the viewer know that the connection is active. 1797 // Send ack straight away to let the viewer know that the connection is active.
1800 // The client will be null if it already exists (e.g. if on a region crossing the client sends a use 1798 // The client will be null if it already exists (e.g. if on a region crossing the client sends a use
1801 // circuit code to the existing child agent. This is not particularly obvious. 1799 // circuit code to the existing child agent. This is not particularly obvious.
@@ -1828,10 +1826,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1828 } 1826 }
1829 catch (Exception e) 1827 catch (Exception e)
1830 { 1828 {
1831 // this may already be done.. or not..
1832 lock (m_pendingCache)
1833 m_pendingCache.Remove(endPoint);
1834
1835 m_log.ErrorFormat( 1829 m_log.ErrorFormat(
1836 "[LLUDPSERVER]: UseCircuitCode handling from endpoint {0}, client {1} {2} failed. Exception {3}{4}", 1830 "[LLUDPSERVER]: UseCircuitCode handling from endpoint {0}, client {1} {2} failed. Exception {3}{4}",
1837 endPoint != null ? endPoint.ToString() : "n/a", 1831 endPoint != null ? endPoint.ToString() : "n/a",
@@ -2069,8 +2063,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2069 client.Kick("Simulator logged you out due to connection timeout."); 2063 client.Kick("Simulator logged you out due to connection timeout.");
2070 } 2064 }
2071 2065
2072 if (!m_scene.CloseAgent(client.AgentId, true)) 2066 m_scene.CloseAgent(client.AgentId, true);
2073 client.Close(true,true);
2074 } 2067 }
2075 2068
2076 private void IncomingPacketHandler() 2069 private void IncomingPacketHandler()