diff options
author | Justin Clark-Casey (justincc) | 2012-10-17 23:08:14 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-17 23:08:14 +0100 |
commit | faf6b568393d8edfed103e0a656c98322c195e95 (patch) | |
tree | a85ae4d98d4c48b68591420ec43af156293106b9 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | If RecycleBaseUDPPackets = true, also pool IncomingPackets to reduce memory c... (diff) | |
download | opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.zip opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.tar.gz opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.tar.bz2 opensim-SC_OLD-faf6b568393d8edfed103e0a656c98322c195e95.tar.xz |
Explicitly return only the incoming AgentUpdate packet as this is the only one we pool atm, rather than attempting to return all incoming packets.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 0d4f09d..1e93b84 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5425,16 +5425,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5425 | 5425 | ||
5426 | #region Scene/Avatar | 5426 | #region Scene/Avatar |
5427 | 5427 | ||
5428 | private bool HandleAgentUpdate(IClientAPI sener, Packet Pack) | 5428 | private bool HandleAgentUpdate(IClientAPI sener, Packet packet) |
5429 | { | 5429 | { |
5430 | if (OnAgentUpdate != null) | 5430 | if (OnAgentUpdate != null) |
5431 | { | 5431 | { |
5432 | bool update = false; | 5432 | bool update = false; |
5433 | AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack; | 5433 | AgentUpdatePacket agenUpdate = (AgentUpdatePacket)packet; |
5434 | 5434 | ||
5435 | #region Packet Session and User Check | 5435 | #region Packet Session and User Check |
5436 | if (agenUpdate.AgentData.SessionID != SessionId || agenUpdate.AgentData.AgentID != AgentId) | 5436 | if (agenUpdate.AgentData.SessionID != SessionId || agenUpdate.AgentData.AgentID != AgentId) |
5437 | { | ||
5438 | PacketPool.Instance.ReturnPacket(packet); | ||
5437 | return false; | 5439 | return false; |
5440 | } | ||
5438 | #endregion | 5441 | #endregion |
5439 | 5442 | ||
5440 | AgentUpdatePacket.AgentDataBlock x = agenUpdate.AgentData; | 5443 | AgentUpdatePacket.AgentDataBlock x = agenUpdate.AgentData; |
@@ -5499,6 +5502,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5499 | } | 5502 | } |
5500 | } | 5503 | } |
5501 | 5504 | ||
5505 | PacketPool.Instance.ReturnPacket(packet); | ||
5506 | |||
5502 | return true; | 5507 | return true; |
5503 | } | 5508 | } |
5504 | 5509 | ||
@@ -11851,8 +11856,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11851 | 11856 | ||
11852 | if (!ProcessPacketMethod(packet)) | 11857 | if (!ProcessPacketMethod(packet)) |
11853 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); | 11858 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); |
11854 | |||
11855 | PacketPool.Instance.ReturnPacket(packet); | ||
11856 | } | 11859 | } |
11857 | 11860 | ||
11858 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | 11861 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) |