From: Eric Leblond Date: Tue, 18 Sep 2012 13:01:12 +0000 (+0200) Subject: Fix logic operator. X-Git-Tag: suricata-1.4beta2~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=566674ae4ab12529c67220d3c23d5fa4f787e657;p=thirdparty%2Fsuricata.git Fix logic operator. Previous patches on the same subject did not fixed this error as it was undetected because the code was not compiled on my setup. --- diff --git a/src/source-erf-dag.c b/src/source-erf-dag.c index 04aab9367e..bc9b992e36 100644 --- a/src/source-erf-dag.c +++ b/src/source-erf-dag.c @@ -315,7 +315,7 @@ TmEcode ReceiveErfDagLoop(ThreadVars *tv, void *data, void *slot) while (1) { - if (suricata_ctl_flags & (SURICATA_STOP || SURICATA_KILL)) { + if (suricata_ctl_flags & (SURICATA_STOP | SURICATA_KILL)) { SCReturnInt(TM_ECODE_OK); } diff --git a/src/source-napatech.c b/src/source-napatech.c index 1939d900e2..f74d4ab16e 100644 --- a/src/source-napatech.c +++ b/src/source-napatech.c @@ -210,7 +210,7 @@ TmEcode NapatechFeedLoop(ThreadVars *tv, void *data, void *slot) ntv->slot = s->slot_next; while (1) { - if (suricata_ctl_flags & (SURICATA_STOP || SURICATA_KILL)) { + if (suricata_ctl_flags & (SURICATA_STOP | SURICATA_KILL)) { SCReturnInt(TM_ECODE_OK); } diff --git a/src/source-pfring.c b/src/source-pfring.c index fc35003dca..e433fc40d5 100644 --- a/src/source-pfring.c +++ b/src/source-pfring.c @@ -252,7 +252,7 @@ TmEcode ReceivePfringLoop(ThreadVars *tv, void *data, void *slot) ptv->slot = s->slot_next; while(1) { - if (suricata_ctl_flags & (SURICATA_STOP || SURICATA_KILL)) { + if (suricata_ctl_flags & (SURICATA_STOP | SURICATA_KILL)) { SCReturnInt(TM_ECODE_OK); }