changes on updates

0.9.1.0-post-fixes
UbitUmarov 2018-12-30 02:41:13 +00:00
parent cf89799c0b
commit 817b622b79
3 changed files with 9 additions and 21 deletions

View File

@ -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<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
= new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
block.Data = data;
block.TextureEntry = Utils.EmptyBytes;

View File

@ -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;

View File

@ -55,8 +55,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public bool RecyclePackets { get; set; }
public bool RecycleDataBlocks { get; set; }
/// <summary>
/// The number of packets pooled
/// </summary>
@ -105,8 +103,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
// defaults
RecyclePackets = true;
// RecycleDataBlocks = true;
RecycleDataBlocks = false;
}
/// <summary>
@ -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<ObjectUpdatePacket.ObjectDataBlock>(oupod);
}
oup.ObjectData = null;
trypool = true;
break;
case PacketType.ImprovedTerseObjectUpdate:
ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet;
if (RecycleDataBlocks)
{
foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock itoupod in itoup.ObjectData)
ReturnDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(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: