aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
authorUbitUmarov2018-12-30 02:41:13 +0000
committerUbitUmarov2018-12-30 02:41:13 +0000
commit817b622b79ca06925662deab7f80dcd06971a25c (patch)
treec7efea7eb7de3bde4aac692ceb732b0906a8e650 /OpenSim/Region/ClientStack/Linden/UDP
parentchanges on updates (diff)
downloadopensim-SC-817b622b79ca06925662deab7f80dcd06971a25c.zip
opensim-SC-817b622b79ca06925662deab7f80dcd06971a25c.tar.gz
opensim-SC-817b622b79ca06925662deab7f80dcd06971a25c.tar.bz2
opensim-SC-817b622b79ca06925662deab7f80dcd06971a25c.tar.xz
changes on updates
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs25
3 files changed, 9 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index afc317e..4956423 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
5732 Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2; 5732 Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2;
5733 5733
5734 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block 5734 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block
5735 = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 5735 = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
5736 5736
5737 block.Data = data; 5737 block.Data = data;
5738 block.TextureEntry = Utils.EmptyBytes; 5738 block.TextureEntry = Utils.EmptyBytes;
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index b8ea6c1..afa1e4c 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
855 LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method) 855 LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method)
856 { 856 {
857 // CoarseLocationUpdate packets cannot be split in an automated way 857 // CoarseLocationUpdate packets cannot be split in an automated way
858 if (allowSplitting && packet.HasVariableBlocks && packet.Type != PacketType.CoarseLocationUpdate) 858 if (allowSplitting && packet.HasVariableBlocks && packet.Type != PacketType.CoarseLocationUpdate &&
859 packet.Length + 20 > MTU)
859 { 860 {
860 byte[][] datas = packet.ToBytesMultiple(); 861 byte[][] datas = packet.ToBytesMultiple();
861 int packetCount = datas.Length; 862 int packetCount = datas.Length;
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
index 9b94a29..9e8460c 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
55 55
56 public bool RecyclePackets { get; set; } 56 public bool RecyclePackets { get; set; }
57 57
58 public bool RecycleDataBlocks { get; set; }
59
60 /// <summary> 58 /// <summary>
61 /// The number of packets pooled 59 /// The number of packets pooled
62 /// </summary> 60 /// </summary>
@@ -105,8 +103,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
105 { 103 {
106 // defaults 104 // defaults
107 RecyclePackets = true; 105 RecyclePackets = true;
108 // RecycleDataBlocks = true;
109 RecycleDataBlocks = false;
110 } 106 }
111 107
112 /// <summary> 108 /// <summary>
@@ -209,32 +205,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
209 { 205 {
210 case PacketType.ObjectUpdate: 206 case PacketType.ObjectUpdate:
211 ObjectUpdatePacket oup = (ObjectUpdatePacket)packet; 207 ObjectUpdatePacket oup = (ObjectUpdatePacket)packet;
212
213 if (RecycleDataBlocks)
214 {
215 foreach (ObjectUpdatePacket.ObjectDataBlock oupod in oup.ObjectData)
216 ReturnDataBlock<ObjectUpdatePacket.ObjectDataBlock>(oupod);
217 }
218
219 oup.ObjectData = null; 208 oup.ObjectData = null;
220 trypool = true; 209 trypool = true;
221 break; 210 break;
222 211
223 case PacketType.ImprovedTerseObjectUpdate: 212 case PacketType.ImprovedTerseObjectUpdate:
224 ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet; 213 ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet;
225
226 if (RecycleDataBlocks)
227 {
228 foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock itoupod in itoup.ObjectData)
229 ReturnDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(itoupod);
230 }
231
232 itoup.ObjectData = null; 214 itoup.ObjectData = null;
233 trypool = true; 215 trypool = true;
234 break; 216 break;
235 217
236 case PacketType.AgentUpdate:
237 case PacketType.PacketAck: 218 case PacketType.PacketAck:
219 PacketAckPacket ackup = (PacketAckPacket)packet;
220 ackup.Packets = null;
221 trypool = true;
222 break;
223
224 case PacketType.AgentUpdate:
238 trypool = true; 225 trypool = true;
239 break; 226 break;
240 default: 227 default: