aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorubit2012-07-15 23:56:00 +0200
committerubit2012-07-15 23:56:00 +0200
commit337b2e634a92a8064df21c47de58580f56af0d3e (patch)
tree9112e75b4f8b60f96bb8a53ec161069d55fbf54a /OpenSim/Region/ClientStack/Linden
parentto stash (diff)
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC-337b2e634a92a8064df21c47de58580f56af0d3e.zip
opensim-SC-337b2e634a92a8064df21c47de58580f56af0d3e.tar.gz
opensim-SC-337b2e634a92a8064df21c47de58580f56af0d3e.tar.bz2
opensim-SC-337b2e634a92a8064df21c47de58580f56af0d3e.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Conflicts: OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index c64b5f2..10e8e48 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -153,6 +153,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
153 /// <summary>Flag to signal when clients should send pings</summary> 153 /// <summary>Flag to signal when clients should send pings</summary>
154 private bool m_sendPing; 154 private bool m_sendPing;
155 155
156 private ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>> m_pendingCache = new ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>>();
157
156 private int m_defaultRTO = 0; 158 private int m_defaultRTO = 0;
157 private int m_maxRTO = 0; 159 private int m_maxRTO = 0;
158 160
@@ -701,6 +703,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
701 { 703 {
702 object[] array = new object[] { buffer, packet }; 704 object[] array = new object[] { buffer, packet };
703 705
706 lock (m_pendingCache)
707 m_pendingCache.AddOrUpdate(address, new Queue<UDPPacketBuffer>(), 60);
704 Util.FireAndForget(HandleUseCircuitCode, array); 708 Util.FireAndForget(HandleUseCircuitCode, array);
705 709
706 return; 710 return;
@@ -710,7 +714,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
710 IClientAPI client; 714 IClientAPI client;
711 if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView)) 715 if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView))
712 { 716 {
717<<<<<<< HEAD
713 m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); 718 m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName);
719=======
720 lock (m_pendingCache)
721 {
722 Queue<UDPPacketBuffer> queue;
723 if (m_pendingCache.TryGetValue(address, out queue))
724 queue.Enqueue(buffer);
725 }
726
727// m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName);
728>>>>>>> 2606484e45138adef289386509b1e27552a32aee
714 return; 729 return;
715 } 730 }
716 731
@@ -943,6 +958,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
943 // We only want to send initial data to new clients, not ones which are being converted from child to root. 958 // We only want to send initial data to new clients, not ones which are being converted from child to root.
944 if (client != null) 959 if (client != null)
945 client.SceneAgent.SendInitialDataToMe(); 960 client.SceneAgent.SendInitialDataToMe();
961
962 // Now we know we can handle more data
963 Thread.Sleep(200);
964
965 // Obtain the queue and remove it from the cache
966 Queue<UDPPacketBuffer> queue = null;
967
968 lock (m_pendingCache)
969 {
970 if (!m_pendingCache.TryGetValue(remoteEndPoint, out queue))
971 return;
972 m_pendingCache.Remove(remoteEndPoint);
973 }
974
975 // Reinject queued packets
976 while(queue.Count > 0)
977 {
978 UDPPacketBuffer buf = queue.Dequeue();
979 PacketReceived(buf);
980 }
981 queue = null;
946 } 982 }
947 else 983 else
948 { 984 {
@@ -950,6 +986,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
950 m_log.WarnFormat( 986 m_log.WarnFormat(
951 "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}", 987 "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}",
952 uccp.CircuitCode.ID, uccp.CircuitCode.Code, remoteEndPoint); 988 uccp.CircuitCode.ID, uccp.CircuitCode.Code, remoteEndPoint);
989 lock (m_pendingCache)
990 m_pendingCache.Remove(remoteEndPoint);
953 } 991 }
954 992
955 // m_log.DebugFormat( 993 // m_log.DebugFormat(