From: Victor Julien Date: Fri, 23 Oct 2015 16:01:55 +0000 (+0200) Subject: threading: store thread module flags in threadvars X-Git-Tag: suricata-3.0RC1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca3916881fe598b2b9b10f7f90d3636f938a1db5;p=thirdparty%2Fsuricata.git threading: store thread module flags in threadvars --- 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) {