diff --git a/src/tm-threads.c b/src/tm-threads.c index 7264c84cbd..51d82c78ff 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -804,6 +804,7 @@ void TmSlotSetFuncAppend(ThreadVars *tv, TmModule *tm, void *data) if (slot == NULL) return; memset(slot, 0, sizeof(TmSlot)); + slot->tv = tv; slot->SlotThreadInit = tm->ThreadInit; slot->slot_initdata = data; slot->SlotFunc = tm->Func; diff --git a/src/tm-threads.h b/src/tm-threads.h index 2aa747debc..43a921156b 100644 --- a/src/tm-threads.h +++ b/src/tm-threads.h @@ -30,6 +30,9 @@ #include "tm-modules.h" typedef struct TmSlot_ { + /* the TV holding this slot */ + ThreadVars *tv; + /* function pointers */ TmEcode (*SlotFunc)(ThreadVars *, Packet *, void *, PacketQueue *, PacketQueue *);