From 15359dc47edd204cb6edb20c7964b3bf24acd5af Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Fri, 9 Sep 2011 12:50:15 +0530 Subject: [PATCH] Slot structure now holds the TV it belongs to --- src/tm-threads.c | 1 + src/tm-threads.h | 3 +++ 2 files changed, 4 insertions(+) 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 *);