From 429a84f390212d0f414a08420707fc90aca2a331 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 5 Oct 2009 17:38:14 -0700 Subject: Beginning work on the new LLUDP implementation --- OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index 19ad0b4..000f455 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs @@ -197,12 +197,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_currentPacket = StartPacket; } - if ((m_imageManager != null) && (m_imageManager.Client != null) && (m_imageManager.Client.PacketHandler != null)) - if (m_imageManager.Client.PacketHandler.GetQueueCount(ThrottleOutPacketType.Texture) == 0) + if (m_imageManager != null && m_imageManager.Client != null) + { + if (m_imageManager.Client.IsThrottleEmpty(ThrottleOutPacketType.Texture)) { //m_log.Debug("No textures queued, sending one packet to kickstart it"); SendPacket(m_imageManager.Client); } + } } } } -- cgit v1.1 From e7c877407f2a72a9519eb53debca5aeef20cded9 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 6 Oct 2009 02:38:00 -0700 Subject: * Continued work on the new LLUDP implementation. Appears to be functioning, although not everything is reimplemented yet * Replaced logic in ThreadTracker with a call to System.Diagnostics that does the same thing * Added Util.StringToBytes256() and Util.StringToBytes1024() to clamp output at byte[256] and byte[1024], respectively * Fixed formatting for a MySQLAssetData error logging line --- OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | 33 +++++++++--------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index 000f455..2f1face 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs @@ -76,27 +76,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (m_currentPacket <= m_stopPacket) { - bool SendMore = true; + int count = 0; + bool sendMore = true; + if (!m_sentInfo || (m_currentPacket == 0)) { - if (SendFirstPacket(client)) - { - SendMore = false; - } + sendMore = !SendFirstPacket(client); + m_sentInfo = true; - m_currentPacket++; + ++m_currentPacket; + ++count; } if (m_currentPacket < 2) { m_currentPacket = 2; } - - int count = 0; - while (SendMore && count < maxpack && m_currentPacket <= m_stopPacket) + + while (sendMore && count < maxpack && m_currentPacket <= m_stopPacket) { - count++; - SendMore = SendPacket(client); - m_currentPacket++; + sendMore = SendPacket(client); + ++m_currentPacket; + ++count; } if (m_currentPacket > m_stopPacket) @@ -196,15 +196,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_currentPacket = StartPacket; } - - if (m_imageManager != null && m_imageManager.Client != null) - { - if (m_imageManager.Client.IsThrottleEmpty(ThrottleOutPacketType.Texture)) - { - //m_log.Debug("No textures queued, sending one packet to kickstart it"); - SendPacket(m_imageManager.Client); - } - } } } } -- cgit v1.1