diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index afc317ea49..4956423858 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5732,7 +5732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2; ImprovedTerseObjectUpdatePacket.ObjectDataBlock block - = PacketPool.Instance.GetDataBlock(); + = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); block.Data = data; block.TextureEntry = Utils.EmptyBytes; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index b8ea6c1e6b..afa1e4c8ff 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -855,7 +855,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method) { // CoarseLocationUpdate packets cannot be split in an automated way - if (allowSplitting && packet.HasVariableBlocks && packet.Type != PacketType.CoarseLocationUpdate) + if (allowSplitting && packet.HasVariableBlocks && packet.Type != PacketType.CoarseLocationUpdate && + packet.Length + 20 > MTU) { byte[][] datas = packet.ToBytesMultiple(); int packetCount = datas.Length; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs index 9b94a29ed6..9e8460c934 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs @@ -55,8 +55,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP public bool RecyclePackets { get; set; } - public bool RecycleDataBlocks { get; set; } - /// /// The number of packets pooled /// @@ -105,8 +103,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // defaults RecyclePackets = true; - // RecycleDataBlocks = true; - RecycleDataBlocks = false; } /// @@ -209,32 +205,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP { case PacketType.ObjectUpdate: ObjectUpdatePacket oup = (ObjectUpdatePacket)packet; - - if (RecycleDataBlocks) - { - foreach (ObjectUpdatePacket.ObjectDataBlock oupod in oup.ObjectData) - ReturnDataBlock(oupod); - } - oup.ObjectData = null; trypool = true; break; case PacketType.ImprovedTerseObjectUpdate: ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet; - - if (RecycleDataBlocks) - { - foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock itoupod in itoup.ObjectData) - ReturnDataBlock(itoupod); - } - itoup.ObjectData = null; trypool = true; break; - case PacketType.AgentUpdate: case PacketType.PacketAck: + PacketAckPacket ackup = (PacketAckPacket)packet; + ackup.Packets = null; + trypool = true; + break; + + case PacketType.AgentUpdate: trypool = true; break; default: