From ef074deb52de617743ad50ea29e286dd9c66722d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Jan 2012 21:30:12 +0000 Subject: Add "show image queue " region console command This is so that we can inspect the image download queue (texture download via udp) for debugging purposes. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 14 +++++++++----- OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | 10 ++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index eb1a50e..1e72aa2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -304,6 +304,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected static Dictionary PacketHandlers = new Dictionary(); //Global/static handlers for all clients + /// + /// Handles UDP texture download. + /// + public LLImageManager ImageManager { get; private set; } + private readonly LLUDPServer m_udpServer; private readonly LLUDPClient m_udpClient; private readonly UUID m_sessionId; @@ -348,7 +353,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected Dictionary m_packetHandlers = new Dictionary(); protected Dictionary m_genericPacketHandlers = new Dictionary(); //PauPaw:Local Generic Message handlers protected Scene m_scene; - private LLImageManager m_imageManager; protected string m_firstName; protected string m_lastName; protected Thread m_clientThread; @@ -459,7 +463,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_assetService = m_scene.RequestModuleInterface(); m_GroupsModule = scene.RequestModuleInterface(); - m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface()); + ImageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface()); m_channelVersion = Util.StringToBytes256(scene.GetSimulatorVersion()); m_agentId = agentId; m_sessionId = sessionId; @@ -499,7 +503,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP IsActive = false; // Shutdown the image manager - m_imageManager.Close(); + ImageManager.Close(); // Fire the callback for this connection closing if (OnConnectionClosed != null) @@ -3939,7 +3943,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) - m_imageManager.ProcessImageQueue(m_udpServer.TextureSendLimit); + ImageManager.ProcessImageQueue(m_udpServer.TextureSendLimit); } public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) @@ -7470,7 +7474,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if ((ImageType)block.Type == ImageType.Baked) args.Priority *= 2.0f; - m_imageManager.EnqueueReq(args); + ImageManager.EnqueueReq(args); } return true; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs index 3e31b7d..db428f1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs @@ -245,6 +245,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_shuttingdown = true; } + /// + /// Returns an array containing all the images in the queue. + /// + /// + public J2KImage[] GetImages() + { + lock (m_priorityQueue) + return m_priorityQueue.ToArray(); + } + #region Priority Queue Helpers private J2KImage GetHighestPriorityImage() -- cgit v1.1