From 3234472d6203671a492a73042a0b56d6301903e0 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 19 Nov 2008 06:15:21 +0000 Subject: Reverting the texture sending patch and the new libOMV. This makes this release a direct descendant of the stable 7364, with all the features and none of the issues. This omits the following patch chain: r7383 r7382 r7381 r7377 r7375 r7373 r7372 r7370 r7369 r7368 r7367 r7366 --- .../Agent/TextureDownload/TextureDownloadModule.cs | 58 ++++++++++------------ .../Agent/TextureDownload/TextureNotFoundSender.cs | 1 + .../TextureDownload/UserTextureDownloadService.cs | 9 ++-- 3 files changed, 31 insertions(+), 37 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Agent/TextureDownload') diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index aac6e35..af51df6 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs @@ -176,52 +176,44 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload { ITextureSender sender = null; -// try -// { + try + { while (true) { - try + sender = m_queueSenders.Dequeue(); + + if (sender.Cancel) { - sender = m_queueSenders.Dequeue(); + TextureSent(sender); - if (sender.Cancel) + sender.Cancel = false; + } + else + { + bool finished = sender.SendTexturePacket(); + if (finished) { TextureSent(sender); - - sender.Cancel = false; } else { - bool finished = sender.SendTexturePacket(); - if (finished) - { - TextureSent(sender); - } - else - { - m_queueSenders.Enqueue(sender); - } + m_queueSenders.Enqueue(sender); } + } - // Make sure that any sender we currently have can get garbage collected - sender = null; + // Make sure that any sender we currently have can get garbage collected + sender = null; - //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); - } - catch(Exception e) - { - m_log.ErrorFormat( - "[TEXTURE]: Texture send thread caught exception. The texture send was aborted. Exception is {0}", e); - } + //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); } -// } -// catch (Exception e) -// { -// // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened -// m_log.ErrorFormat( -// "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", -// e); -// } + } + catch (Exception e) + { + // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened + m_log.ErrorFormat( + "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", + e); + } } /// diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs index 044ee76..c064064 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs @@ -28,6 +28,7 @@ using System.Reflection; using log4net; using OpenMetaverse; +using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs index bcae259..715dc4b 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs @@ -57,10 +57,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// /// We will allow the client to request the same texture n times before dropping further requests /// - /// This number contains repeated requests for the same texture at different resolutions (which - /// are handled since r7368). However, this situation should be handled in a more sophisticated way. + /// This number includes repeated requests for the same texture at different resolutions (which we don't + /// currently handle properly as far as I know). However, this situation should be handled in a more + /// sophisticated way. /// - private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 15; + private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5; /// /// XXX Also going to limit requests for found textures. @@ -149,7 +150,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload m_scene.AddPendingDownloads(1); - TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber, e.Priority); + TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); m_textureSenders.Add(e.RequestedAssetID, requestHandler); m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); -- cgit v1.1