From c92a9a664035ad4c36a0ac905751d105770dca51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 19 Jan 2012 19:49:06 +0000 Subject: Add "image queues clear " console command This allows a way to manually clear pending image queue requests for debug purposes --- .../Region/ClientStack/Linden/UDP/LLImageManager.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs index 30d3712..7bfb844 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs @@ -246,6 +246,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// + /// Clear the image queue. + /// + /// The number of requests cleared. + public int ClearImageQueue() + { + int requestsDeleted; + + lock (m_priorityQueue) + { + requestsDeleted = m_priorityQueue.Count; + + // Surprisingly, there doesn't seem to be a clear method at this time. + while (!m_priorityQueue.IsEmpty) + m_priorityQueue.DeleteMax(); + } + + return requestsDeleted; + } + + /// /// Returns an array containing all the images in the queue. /// /// -- cgit v1.1