From c1190545cfb1d06037847b94620591d2be6f3c07 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 3 Oct 2013 10:33:56 +0200 Subject: [PATCH] Revert change in queue handler wait logic. Bug #988. --- src/tmqh-flow.c | 2 +- src/tmqh-simple.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tmqh-flow.c b/src/tmqh-flow.c index d25fab619e..4fdb4d06ce 100644 --- a/src/tmqh-flow.c +++ b/src/tmqh-flow.c @@ -88,7 +88,7 @@ Packet *TmqhInputFlow(ThreadVars *tv) SCPerfSyncCountersIfSignalled(tv, 0); SCMutexLock(&q->mutex_q); - while (q->len == 0) { + if (q->len == 0) { /* if we have no packets in queue, wait... */ SCCondWait(&q->cond_q, &q->mutex_q); } diff --git a/src/tmqh-simple.c b/src/tmqh-simple.c index cc5b69c068..fe1902be00 100644 --- a/src/tmqh-simple.c +++ b/src/tmqh-simple.c @@ -50,7 +50,7 @@ Packet *TmqhInputSimple(ThreadVars *t) SCMutexLock(&q->mutex_q); - while (q->len == 0) { + if (q->len == 0) { /* if we have no packets in queue, wait... */ SCCondWait(&q->cond_q, &q->mutex_q); } @@ -111,7 +111,7 @@ void TmqhOutputSimple(ThreadVars *t, Packet *p) SCDQGenericQData *TmqhInputSimpleOnQ(SCDQDataQueue *q) { SCMutexLock(&q->mutex_q); - while (q->len == 0) { + if (q->len == 0) { /* if we have no packets in queue, wait... */ SCCondWait(&q->cond_q, &q->mutex_q); }