From 8920c65b9c21b379c4c9083c2917007b428340e5 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 26 Jun 2014 16:16:51 +0300 Subject: [PATCH] Fixed the logic that decides if a packet was queued (it was reversed) --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index c0a4e56cea..2577a77ad0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -973,7 +973,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP for (int i = 0; i < packetCount; i++) { byte[] data = datas[i]; - if (!SendPacketData(udpClient, data, packet.Type, category, method)) packetQueued = true; } @@ -981,7 +980,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP else { byte[] data = packet.ToBytes(); - packetQueued = SendPacketData(udpClient, data, packet.Type, category, method); + if (!SendPacketData(udpClient, data, packet.Type, category, method)) + packetQueued = true; } PacketPool.Instance.ReturnPacket(packet); @@ -1065,8 +1065,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will // continue to display the deleted object until relog. Therefore, we need to always queue a kill object // packet so that it isn't sent before a queued update packet. - bool requestQueue = type == PacketType.KillObject; - if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue)) + bool forceQueue = (type == PacketType.KillObject); + + if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, forceQueue)) { SendPacketFinal(outgoingPacket); return true; @@ -2305,4 +2306,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } } -} \ No newline at end of file +}