diff options
author | Justin Clark-Casey (justincc) | 2012-10-17 23:08:14 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-17 23:08:14 +0100 |
commit | faf6b568393d8edfed103e0a656c98322c195e95 (patch) | |
tree | a85ae4d98d4c48b68591420ec43af156293106b9 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |
parent | If RecycleBaseUDPPackets = true, also pool IncomingPackets to reduce memory c... (diff) | |
download | opensim-SC-faf6b568393d8edfed103e0a656c98322c195e95.zip opensim-SC-faf6b568393d8edfed103e0a656c98322c195e95.tar.gz opensim-SC-faf6b568393d8edfed103e0a656c98322c195e95.tar.bz2 opensim-SC-faf6b568393d8edfed103e0a656c98322c195e95.tar.xz |
Explicitly return only the incoming AgentUpdate packet as this is the only one we pool atm, rather than attempting to return all incoming packets.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 286d931..419de66 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -314,7 +314,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
314 | 314 | ||
315 | base.StartOutbound(); | 315 | base.StartOutbound(); |
316 | 316 | ||
317 | // This thread will process the packets received that are placed on the packetInbox | ||
318 | Watchdog.StartThread( | 317 | Watchdog.StartThread( |
319 | OutgoingPacketHandler, | 318 | OutgoingPacketHandler, |
320 | string.Format("Outgoing Packets ({0})", m_scene.RegionInfo.RegionName), | 319 | string.Format("Outgoing Packets ({0})", m_scene.RegionInfo.RegionName), |
@@ -930,6 +929,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
930 | // Handle appended ACKs | 929 | // Handle appended ACKs |
931 | if (packet.Header.AppendedAcks && packet.Header.AckList != null) | 930 | if (packet.Header.AppendedAcks && packet.Header.AckList != null) |
932 | { | 931 | { |
932 | // m_log.DebugFormat( | ||
933 | // "[LLUDPSERVER]: Handling {0} appended acks from {1} in {2}", | ||
934 | // packet.Header.AckList.Length, client.Name, m_scene.Name); | ||
935 | |||
933 | for (int i = 0; i < packet.Header.AckList.Length; i++) | 936 | for (int i = 0; i < packet.Header.AckList.Length; i++) |
934 | udpClient.NeedAcks.Acknowledge(packet.Header.AckList[i], now, packet.Header.Resent); | 937 | udpClient.NeedAcks.Acknowledge(packet.Header.AckList[i], now, packet.Header.Resent); |
935 | } | 938 | } |
@@ -939,6 +942,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
939 | { | 942 | { |
940 | PacketAckPacket ackPacket = (PacketAckPacket)packet; | 943 | PacketAckPacket ackPacket = (PacketAckPacket)packet; |
941 | 944 | ||
945 | // m_log.DebugFormat( | ||
946 | // "[LLUDPSERVER]: Handling {0} packet acks for {1} in {2}", | ||
947 | // ackPacket.Packets.Length, client.Name, m_scene.Name); | ||
948 | |||
942 | for (int i = 0; i < ackPacket.Packets.Length; i++) | 949 | for (int i = 0; i < ackPacket.Packets.Length; i++) |
943 | udpClient.NeedAcks.Acknowledge(ackPacket.Packets[i].ID, now, packet.Header.Resent); | 950 | udpClient.NeedAcks.Acknowledge(ackPacket.Packets[i].ID, now, packet.Header.Resent); |
944 | 951 | ||
@@ -952,6 +959,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
952 | 959 | ||
953 | if (packet.Header.Reliable) | 960 | if (packet.Header.Reliable) |
954 | { | 961 | { |
962 | // m_log.DebugFormat( | ||
963 | // "[LLUDPSERVER]: Adding ack request for {0} {1} from {2} in {3}", | ||
964 | // packet.Type, packet.Header.Sequence, client.Name, m_scene.Name); | ||
965 | |||
955 | udpClient.PendingAcks.Enqueue(packet.Header.Sequence); | 966 | udpClient.PendingAcks.Enqueue(packet.Header.Sequence); |
956 | 967 | ||
957 | // This is a somewhat odd sequence of steps to pull the client.BytesSinceLastACK value out, | 968 | // This is a somewhat odd sequence of steps to pull the client.BytesSinceLastACK value out, |
@@ -998,6 +1009,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
998 | 1009 | ||
999 | if (packet.Type == PacketType.StartPingCheck) | 1010 | if (packet.Type == PacketType.StartPingCheck) |
1000 | { | 1011 | { |
1012 | // m_log.DebugFormat("[LLUDPSERVER]: Handling ping from {0} in {1}", client.Name, m_scene.Name); | ||
1013 | |||
1001 | // We don't need to do anything else with ping checks | 1014 | // We don't need to do anything else with ping checks |
1002 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; | 1015 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; |
1003 | CompletePing(udpClient, startPing.PingID.PingID); | 1016 | CompletePing(udpClient, startPing.PingID.PingID); |
@@ -1286,7 +1299,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1286 | // on to en-US to avoid number parsing issues | 1299 | // on to en-US to avoid number parsing issues |
1287 | Culture.SetCurrentCulture(); | 1300 | Culture.SetCurrentCulture(); |
1288 | 1301 | ||
1289 | while (base.IsRunningInbound) | 1302 | while (IsRunningInbound) |
1290 | { | 1303 | { |
1291 | try | 1304 | try |
1292 | { | 1305 | { |