]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threading: store thread module flags in threadvars
authorVictor Julien <victor@inliniac.net>
Fri, 23 Oct 2015 16:01:55 +0000 (18:01 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 26 Oct 2015 08:11:55 +0000 (09:11 +0100)
src/threadvars.h
src/tm-threads.c

index a632a23b4f271c77a784df93d43a10e4106a50a2..79a2b34dc4fd31fc6c2fa09c96e1b3b2b06dcde4 100644 (file)
@@ -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;
 
index c6828b4071ad1bf2d14158b4ebd4721e92644085..b47d4b050dd90d1b8febd4085852a7416e68f228 100644 (file)
@@ -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) {