]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Revert change in queue handler wait logic. Bug #988.
authorVictor Julien <victor@inliniac.net>
Thu, 3 Oct 2013 08:33:56 +0000 (10:33 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 3 Oct 2013 08:33:56 +0000 (10:33 +0200)
src/tmqh-flow.c
src/tmqh-simple.c

index d25fab619eaa4407d086e3b7805cd7f8d3db9b4b..4fdb4d06cede120e5a6070854699eee196707e8d 100644 (file)
@@ -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);
     }
index cc5b69c06820383b7189463a135b8f9dab5efd48..fe1902be003b1163ccd800bbe9b85538ebdc4e42 100644 (file)
@@ -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);
     }