diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index 8e56afb205..a7ad37dcb9 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs @@ -71,6 +71,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload if (m_scene == null) { //Console.WriteLine("Creating Texture download module"); + m_scene = scene; m_thread = new Thread(new ThreadStart(ProcessTextureSenders)); m_thread.Name = "ProcessTextureSenderThread"; m_thread.IsBackground = true; @@ -120,7 +121,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload if (m_userTextureServices.TryGetValue(agentId, out textureService)) { textureService.Close(); - + m_log.DebugFormat("[TEXTURE MODULE]: Removing UserTextureServices from {0}", m_scene.RegionInfo.RegionName); m_userTextureServices.Remove(agentId); } } @@ -144,9 +145,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload { if (m_userTextureServices.TryGetValue(client.AgentId, out textureService)) { + //m_log.DebugFormat("[TEXTURE MODULE]: Found existing UserTextureServices in ", m_scene.RegionInfo.RegionName); return true; } + m_log.DebugFormat("[TEXTURE MODULE]: Creating new UserTextureServices in ", m_scene.RegionInfo.RegionName); textureService = new UserTextureDownloadService(client, m_scene, m_queueSenders); m_userTextureServices.Add(client.AgentId, textureService);