From 047aba2067b476b319e9b53924abea98ea8ba0d3 Mon Sep 17 00:00:00 2001 From: Johan Berntsson Date: Thu, 3 Jan 2008 00:59:12 +0000 Subject: I have fixed the ZeroDecodeCommand bug, and restored my packet recycling code. Let me know by IRC if there are other problems --- OpenSim/Region/Environment/LandManagement/Land.cs | 10 +++++----- OpenSim/Region/Environment/LandManagement/LandManager.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Environment/LandManagement') diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index bd26fdf..5c99ffd 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs @@ -111,7 +111,7 @@ namespace OpenSim.Region.Environment.LandManagement public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) { - ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket(); + ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ParcelProperties); // TODO: don't create new blocks if recycling an old packet updatePacket.ParcelData.AABBMax = landData.AABBMax; @@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.LandManagement if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) { - replyPacket = new ParcelAccessListReplyPacket(); + replyPacket = (ParcelAccessListReplyPacket) PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply); replyPacket.Data.AgentID = agentID; replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Access; replyPacket.Data.LocalID = landData.localID; @@ -349,7 +349,7 @@ namespace OpenSim.Region.Environment.LandManagement if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) { - replyPacket = new ParcelAccessListReplyPacket(); + replyPacket = (ParcelAccessListReplyPacket) PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply); replyPacket.Data.AgentID = agentID; replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Ban; replyPacket.Data.LocalID = landData.localID; @@ -660,7 +660,7 @@ namespace OpenSim.Region.Environment.LandManagement bool firstCall = true; int MAX_OBJECTS_PER_PACKET = 251; - ForceObjectSelectPacket pack = new ForceObjectSelectPacket(); + ForceObjectSelectPacket pack = (ForceObjectSelectPacket) PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect); // TODO: don't create new blocks if recycling an old packet ForceObjectSelectPacket.DataBlock[] data; while (resultLocalIDs.Count > 0) @@ -699,7 +699,7 @@ namespace OpenSim.Region.Environment.LandManagement public void sendLandObjectOwners(IClientAPI remote_client) { Dictionary ownersAndCount = new Dictionary(); - ParcelObjectOwnersReplyPacket pack = new ParcelObjectOwnersReplyPacket(); + ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket) PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply); // TODO: don't create new blocks if recycling an old packet foreach (SceneObjectGroup obj in primsOverMe) diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index d463964..22e7fc9 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs @@ -494,7 +494,7 @@ namespace OpenSim.Region.Environment.LandManagement if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) { byteArrayCount = 0; - packet = new ParcelOverlayPacket(); + packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay); packet.ParcelData.Data = byteArray; packet.ParcelData.SequenceID = sequenceID; remote_client.OutPacket((Packet) packet, ThrottleOutPacketType.Task); -- cgit v1.1