Add "image queues clear <first-name> <last-name>" console command

This allows a way to manually clear pending image queue requests for debug purposes
This commit is contained in:
Justin Clark-Casey (justincc)
2012-01-19 19:49:06 +00:00
parent d75899f2d1
commit c92a9a6640
2 changed files with 80 additions and 15 deletions

View File

@@ -245,6 +245,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_shuttingdown = true;
}
/// <summary>
/// Clear the image queue.
/// </summary>
/// <returns>The number of requests cleared.</returns>
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;
}
/// <summary>
/// Returns an array containing all the images in the queue.
/// </summary>