From ca3916881fe598b2b9b10f7f90d3636f938a1db5 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 23 Oct 2015 18:01:55 +0200 Subject: [PATCH] threading: store thread module flags in threadvars --- src/threadvars.h | 3 +++ src/tm-threads.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/threadvars.h b/src/threadvars.h index a632a23b4f..79a2b34dc4 100644 --- a/src/threadvars.h +++ b/src/threadvars.h @@ -71,6 +71,9 @@ typedef struct ThreadVars_ { /** no of times the thread has been restarted on failure */ uint8_t restarted; + /** TmModule::flags for each module part of this thread */ + uint8_t tmm_flags; + /** local id */ int id; diff --git a/src/tm-threads.c b/src/tm-threads.c index c6828b4071..b47d4b050d 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -730,6 +730,7 @@ static inline TmSlot * _TmSlotSetFuncAppend(ThreadVars *tv, TmModule *tm, void * * received a TM as arg, if it didn't exist */ slot->tm_id = TmModuleGetIDForTM(tm); + tv->tmm_flags |= tm->flags; tv->cap_flags |= tm->cap_flags; if (tv->tm_slots == NULL) {