aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJohan Berntsson2008-01-03 00:59:12 +0000
committerJohan Berntsson2008-01-03 00:59:12 +0000
commit047aba2067b476b319e9b53924abea98ea8ba0d3 (patch)
treed7d62baa41e76bff29ab20a63f8ba541356bd533 /OpenSim/Region/Environment
parentMinor refactoring to expose PrimInventory from SceneObjectPart (diff)
downloadopensim-SC_OLD-047aba2067b476b319e9b53924abea98ea8ba0d3.zip
opensim-SC_OLD-047aba2067b476b319e9b53924abea98ea8ba0d3.tar.gz
opensim-SC_OLD-047aba2067b476b319e9b53924abea98ea8ba0d3.tar.bz2
opensim-SC_OLD-047aba2067b476b319e9b53924abea98ea8ba0d3.tar.xz
I have fixed the ZeroDecodeCommand bug, and restored my packet recycling code. Let me know by IRC if there are other problems
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/LandManagement/Land.cs10
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs2
6 files changed, 11 insertions, 11 deletions
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
111 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, 111 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result,
112 IClientAPI remote_client) 112 IClientAPI remote_client)
113 { 113 {
114 ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket(); 114 ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ParcelProperties);
115 // TODO: don't create new blocks if recycling an old packet 115 // TODO: don't create new blocks if recycling an old packet
116 116
117 updatePacket.ParcelData.AABBMax = landData.AABBMax; 117 updatePacket.ParcelData.AABBMax = landData.AABBMax;
@@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.LandManagement
337 337
338 if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) 338 if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
339 { 339 {
340 replyPacket = new ParcelAccessListReplyPacket(); 340 replyPacket = (ParcelAccessListReplyPacket) PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply);
341 replyPacket.Data.AgentID = agentID; 341 replyPacket.Data.AgentID = agentID;
342 replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Access; 342 replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Access;
343 replyPacket.Data.LocalID = landData.localID; 343 replyPacket.Data.LocalID = landData.localID;
@@ -349,7 +349,7 @@ namespace OpenSim.Region.Environment.LandManagement
349 349
350 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) 350 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both)
351 { 351 {
352 replyPacket = new ParcelAccessListReplyPacket(); 352 replyPacket = (ParcelAccessListReplyPacket) PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply);
353 replyPacket.Data.AgentID = agentID; 353 replyPacket.Data.AgentID = agentID;
354 replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Ban; 354 replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Ban;
355 replyPacket.Data.LocalID = landData.localID; 355 replyPacket.Data.LocalID = landData.localID;
@@ -660,7 +660,7 @@ namespace OpenSim.Region.Environment.LandManagement
660 660
661 bool firstCall = true; 661 bool firstCall = true;
662 int MAX_OBJECTS_PER_PACKET = 251; 662 int MAX_OBJECTS_PER_PACKET = 251;
663 ForceObjectSelectPacket pack = new ForceObjectSelectPacket(); 663 ForceObjectSelectPacket pack = (ForceObjectSelectPacket) PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect);
664 // TODO: don't create new blocks if recycling an old packet 664 // TODO: don't create new blocks if recycling an old packet
665 ForceObjectSelectPacket.DataBlock[] data; 665 ForceObjectSelectPacket.DataBlock[] data;
666 while (resultLocalIDs.Count > 0) 666 while (resultLocalIDs.Count > 0)
@@ -699,7 +699,7 @@ namespace OpenSim.Region.Environment.LandManagement
699 public void sendLandObjectOwners(IClientAPI remote_client) 699 public void sendLandObjectOwners(IClientAPI remote_client)
700 { 700 {
701 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); 701 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>();
702 ParcelObjectOwnersReplyPacket pack = new ParcelObjectOwnersReplyPacket(); 702 ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket) PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply);
703 // TODO: don't create new blocks if recycling an old packet 703 // TODO: don't create new blocks if recycling an old packet
704 704
705 foreach (SceneObjectGroup obj in primsOverMe) 705 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
494 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) 494 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET)
495 { 495 {
496 byteArrayCount = 0; 496 byteArrayCount = 0;
497 packet = new ParcelOverlayPacket(); 497 packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay);
498 packet.ParcelData.Data = byteArray; 498 packet.ParcelData.Data = byteArray;
499 packet.ParcelData.SequenceID = sequenceID; 499 packet.ParcelData.SequenceID = sequenceID;
500 remote_client.OutPacket((Packet) packet, ThrottleOutPacketType.Task); 500 remote_client.OutPacket((Packet) packet, ThrottleOutPacketType.Task);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index af4573b..647fbf4 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -166,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes
166 List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>(); 166 List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>();
167 AvatarResponses = CommsManager.GenerateAgentPickerRequestResponse(RequestID, query); 167 AvatarResponses = CommsManager.GenerateAgentPickerRequestResponse(RequestID, query);
168 168
169 AvatarPickerReplyPacket replyPacket = new AvatarPickerReplyPacket(); 169 AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply);
170 // TODO: don't create new blocks if recycling an old packet 170 // TODO: don't create new blocks if recycling an old packet
171 171
172 AvatarPickerReplyPacket.DataBlock[] searchData = 172 AvatarPickerReplyPacket.DataBlock[] searchData =
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 09b58e0..8032502 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1496,7 +1496,7 @@ namespace OpenSim.Region.Environment.Scenes
1496 m_innerScene.removeUserCount(true); 1496 m_innerScene.removeUserCount(true);
1497 } 1497 }
1498 // Tell a single agent to disconnect from the region. 1498 // Tell a single agent to disconnect from the region.
1499 DisableSimulatorPacket disable = new DisableSimulatorPacket(); 1499 libsecondlife.Packets.DisableSimulatorPacket disable = (libsecondlife.Packets.DisableSimulatorPacket) PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator);
1500 presence.ControllingClient.OutPacket(disable, ThrottleOutPacketType.Task); 1500 presence.ControllingClient.OutPacket(disable, ThrottleOutPacketType.Task);
1501 } 1501 }
1502 } 1502 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 3fc7aec..94b6797 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Scenes
636 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) 636 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags)
637 { 637 {
638 //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags); 638 //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
639 ObjectPropertiesFamilyPacket objPropFamilyPack = new ObjectPropertiesFamilyPacket(); 639 ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket) PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily);
640 // TODO: don't create new blocks if recycling an old packet 640 // TODO: don't create new blocks if recycling an old packet
641 641
642 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); 642 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
@@ -1045,7 +1045,7 @@ namespace OpenSim.Region.Environment.Scenes
1045 /// <param name="client"></param> 1045 /// <param name="client"></param>
1046 public void GetProperites(IClientAPI client) 1046 public void GetProperites(IClientAPI client)
1047 { 1047 {
1048 ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); 1048 ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
1049 // TODO: don't create new blocks if recycling an old packet 1049 // TODO: don't create new blocks if recycling an old packet
1050 1050
1051 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; 1051 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index d955fe7..5033965 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes
83 private void statsHeartBeat(object sender, EventArgs e) 83 private void statsHeartBeat(object sender, EventArgs e)
84 { 84 {
85 m_report.Enabled = false; 85 m_report.Enabled = false;
86 SimStatsPacket statpack = new SimStatsPacket(); 86 SimStatsPacket statpack = (SimStatsPacket) PacketPool.Instance.GetPacket(PacketType.SimStats);
87 // TODO: don't create new blocks if recycling an old packet 87 // TODO: don't create new blocks if recycling an old packet
88 88
89 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[11]; 89 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[11];