tm-threads: add TM_ECODE_DONE state

This patch adds a nex return state which can be used by threads
to warn that a task has been done. In this case, suricata does not
leave.
pull/214/head
Eric Leblond 13 years ago
parent 412482f6b1
commit 6be63bdc4f

@ -85,6 +85,7 @@ typedef enum {
typedef enum {
TM_ECODE_OK = 0, /**< Thread module exits OK*/
TM_ECODE_FAILED, /**< Thread module exits due to failure*/
TM_ECODE_DONE, /**< Thread module task is finished*/
} TmEcode;
/* ThreadVars type */

@ -668,6 +668,9 @@ void *TmThreadsSlotPktAcqLoop(void *td) {
|| suricata_ctl_flags) {
run = 0;
}
if (r == TM_ECODE_DONE) {
run = 0;
}
}
SCPerfSyncCounters(tv, 0);

Loading…
Cancel
Save