Fixed the logic that decides if a packet was queued (it was reversed)

0.8.0.3
Oren Hurvitz 2014-06-26 16:16:51 +03:00 committed by Justin Clark-Casey
parent e41e52e097
commit 8920c65b9c
1 changed files with 6 additions and 5 deletions

View File

@ -973,7 +973,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < packetCount; i++) for (int i = 0; i < packetCount; i++)
{ {
byte[] data = datas[i]; byte[] data = datas[i];
if (!SendPacketData(udpClient, data, packet.Type, category, method)) if (!SendPacketData(udpClient, data, packet.Type, category, method))
packetQueued = true; packetQueued = true;
} }
@ -981,7 +980,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else else
{ {
byte[] data = packet.ToBytes(); 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); 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 // 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 // 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. // packet so that it isn't sent before a queued update packet.
bool requestQueue = type == PacketType.KillObject; bool forceQueue = (type == PacketType.KillObject);
if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue))
if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, forceQueue))
{ {
SendPacketFinal(outgoingPacket); SendPacketFinal(outgoingPacket);
return true; return true;