diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs index a8a1bfe..052d334 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | |||
@@ -90,6 +90,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
90 | StatsManager.RegisterStat(m_blocksReusedStat); | 90 | StatsManager.RegisterStat(m_blocksReusedStat); |
91 | } | 91 | } |
92 | 92 | ||
93 | /// <summary> | ||
94 | /// Gets a packet of the given type. | ||
95 | /// </summary> | ||
96 | /// <param name='type'></param> | ||
97 | /// <returns>Guaranteed to always return a packet, whether from the pool or newly constructed.</returns> | ||
93 | public Packet GetPacket(PacketType type) | 98 | public Packet GetPacket(PacketType type) |
94 | { | 99 | { |
95 | m_packetsReusedStat.Consequent++; | 100 | m_packetsReusedStat.Consequent++; |
@@ -160,7 +165,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
160 | { | 165 | { |
161 | PacketType type = GetType(bytes); | 166 | PacketType type = GetType(bytes); |
162 | 167 | ||
163 | Array.Clear(zeroBuffer, 0, zeroBuffer.Length); | 168 | // Array.Clear(zeroBuffer, 0, zeroBuffer.Length); |
164 | 169 | ||
165 | int i = 0; | 170 | int i = 0; |
166 | Packet packet = GetPacket(type); | 171 | Packet packet = GetPacket(type); |
@@ -207,6 +212,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
207 | switch (packet.Type) | 212 | switch (packet.Type) |
208 | { | 213 | { |
209 | // List pooling packets here | 214 | // List pooling packets here |
215 | case PacketType.AgentUpdate: | ||
210 | case PacketType.PacketAck: | 216 | case PacketType.PacketAck: |
211 | case PacketType.ObjectUpdate: | 217 | case PacketType.ObjectUpdate: |
212 | case PacketType.ImprovedTerseObjectUpdate: | 218 | case PacketType.ImprovedTerseObjectUpdate: |