From b5430217dd9c963b2ea8839402177d2ee8143701 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 20 Jan 2014 22:10:15 -0500 Subject: [PATCH] Fix size tracking in LBQ --- limelight-common/LinkedBlockingQueue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/limelight-common/LinkedBlockingQueue.c b/limelight-common/LinkedBlockingQueue.c index 8a6400a..26c9f79 100644 --- a/limelight-common/LinkedBlockingQueue.c +++ b/limelight-common/LinkedBlockingQueue.c @@ -87,12 +87,14 @@ int LbqWaitForQueueElement(PLINKED_BLOCKING_QUEUE queueHead, void** data) { entry = queueHead->head; queueHead->head = entry->next; + queueHead->currentSize--; *data = entry->data; free(entry); if (queueHead->head == NULL) { + LC_ASSERT(queueHead->currentSize == 0); PltClearEvent(&queueHead->containsDataEvent); }