aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorAdam Frisby2008-11-08 21:08:01 +0000
committerAdam Frisby2008-11-08 21:08:01 +0000
commit7308f35a96b734e905eb997b52a4dd61bfd79cfa (patch)
treee97ccce6b0b0bcf72e73c53e67dccd3588c6df8e /OpenSim/Region/ClientStack
parent* Fixed a major memory leak in packet processing - PacketQueue.Close is never... (diff)
downloadopensim-SC_OLD-7308f35a96b734e905eb997b52a4dd61bfd79cfa.zip
opensim-SC_OLD-7308f35a96b734e905eb997b52a4dd61bfd79cfa.tar.gz
opensim-SC_OLD-7308f35a96b734e905eb997b52a4dd61bfd79cfa.tar.bz2
opensim-SC_OLD-7308f35a96b734e905eb997b52a4dd61bfd79cfa.tar.xz
* Fixed issue where incorrect braces nesting resulted in a section of PacketQueue getting disabled.
* This means the recent memory fix should now be working correctly - so the current largest memory leak should be fixed. AssetCache still needs to be addressed however.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs46
1 files changed, 22 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index 7a66925..9dbb00b 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -768,35 +768,33 @@ namespace OpenSim.Region.ClientStack.LindenUDP
768 768
769 // If we sent a killpacket 769 // If we sent a killpacket
770 if (packet is KillPacket) 770 if (packet is KillPacket)
771 {
772 Abort(); 771 Abort();
773 772
774 // Actually make the byte array and send it 773 // Actually make the byte array and send it
775 byte[] sendbuffer = packet.ToBytes(); 774 byte[] sendbuffer = packet.ToBytes();
776
777 //m_log.DebugFormat(
778 // "[CLIENT]: In {0} sending packet {1}",
779 // m_Client.Scene.RegionInfo.ExternalEndPoint.Port, packet.Header.Sequence);
780 775
781 if (packet.Header.Zerocoded) 776 //m_log.DebugFormat(
782 { 777 // "[CLIENT]: In {0} sending packet {1}",
783 int packetsize = Helpers.ZeroEncode(sendbuffer, 778 // m_Client.Scene.RegionInfo.ExternalEndPoint.Port, packet.Header.Sequence);
784 sendbuffer.Length, m_ZeroOutBuffer);
785 m_PacketServer.SendPacketTo(m_ZeroOutBuffer, packetsize,
786 SocketFlags.None, m_Client.CircuitCode);
787 }
788 else
789 {
790 // Need some extra space in case we need to add proxy
791 // information to the message later
792 Buffer.BlockCopy(sendbuffer, 0, m_ZeroOutBuffer, 0,
793 sendbuffer.Length);
794 m_PacketServer.SendPacketTo(m_ZeroOutBuffer,
795 sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode);
796 }
797 779
798 PacketPool.Instance.ReturnPacket(packet); 780 if (packet.Header.Zerocoded)
781 {
782 int packetsize = Helpers.ZeroEncode(sendbuffer,
783 sendbuffer.Length, m_ZeroOutBuffer);
784 m_PacketServer.SendPacketTo(m_ZeroOutBuffer, packetsize,
785 SocketFlags.None, m_Client.CircuitCode);
786 }
787 else
788 {
789 // Need some extra space in case we need to add proxy
790 // information to the message later
791 Buffer.BlockCopy(sendbuffer, 0, m_ZeroOutBuffer, 0,
792 sendbuffer.Length);
793 m_PacketServer.SendPacketTo(m_ZeroOutBuffer,
794 sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode);
799 } 795 }
796
797 PacketPool.Instance.ReturnPacket(packet);
800 } 798 }
801 799
802 private void Abort() 800 private void Abort()