From 2dc94870aa3c76628ecf7c12b5a1002142a7d8ed Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 9 Feb 2008 00:14:34 +0000 Subject: [PATCH] Mostly debugging verbosity which I shall very shortly comment out. Just want to try this out on windows quickly. --- OpenSim/Framework/BlockingQueue.cs | 7 ++++++- .../Region/Environment/Modules/TextureDownloadModule.cs | 7 ++++++- OpenSim/Region/Environment/Modules/TextureSender.cs | 3 ++- .../Environment/Modules/UserTextureDownloadService.cs | 8 +++++++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs index dd6d866e39..e72884c013 100644 --- a/OpenSim/Framework/BlockingQueue.cs +++ b/OpenSim/Framework/BlockingQueue.cs @@ -64,5 +64,10 @@ namespace OpenSim.Framework return m_queue.Contains(item); } } + + public int Count() + { + return m_queue.Count; + } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index fc31283658..752911143f 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -43,6 +43,9 @@ namespace OpenSim.Region.Environment.Modules //and some small clean up public class TextureDownloadModule : IRegionModule { + private static readonly log4net.ILog m_log + = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private Scene m_scene; private List m_scenes = new List(); @@ -164,6 +167,8 @@ namespace OpenSim.Region.Environment.Modules m_queueSenders.Enqueue(sender); } } + + m_log.Info(String.Format("[TEXTURE DOWNLOAD] Texture sender queue size: {0}", m_queueSenders.Count())); } } @@ -174,4 +179,4 @@ namespace OpenSim.Region.Environment.Modules } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Environment/Modules/TextureSender.cs b/OpenSim/Region/Environment/Modules/TextureSender.cs index 053a558677..08da59130c 100644 --- a/OpenSim/Region/Environment/Modules/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/TextureSender.cs @@ -36,7 +36,8 @@ namespace OpenSim.Region.Environment.Modules { public class TextureSender { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly log4net.ILog m_log + = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public int counter = 0; private AssetBase m_asset; diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs index b458d676cc..08b6979241 100644 --- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs @@ -37,6 +37,9 @@ namespace OpenSim.Region.Environment.Modules { public class UserTextureDownloadService { + private static readonly log4net.ILog m_log + = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private readonly Dictionary m_textureSenders = new Dictionary(); private readonly BlockingQueue m_sharedSendersQueue; private readonly Scene m_scene; @@ -98,9 +101,12 @@ namespace OpenSim.Region.Environment.Modules if (!textureSender.ImageLoaded) { textureSender.TextureReceived(asset); - EnqueueTextureSender(textureSender); } + + m_log.Info(String.Format("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID)); + m_textureSenders.Remove(textureID); + m_log.Info(String.Format("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count)); } else {