Slot structure now holds the TV it belongs to

remotes/origin/master-1.1.x
Anoop Saldanha 14 years ago committed by Victor Julien
parent 9552e6f696
commit 15359dc47e

@ -804,6 +804,7 @@ void TmSlotSetFuncAppend(ThreadVars *tv, TmModule *tm, void *data)
if (slot == NULL) if (slot == NULL)
return; return;
memset(slot, 0, sizeof(TmSlot)); memset(slot, 0, sizeof(TmSlot));
slot->tv = tv;
slot->SlotThreadInit = tm->ThreadInit; slot->SlotThreadInit = tm->ThreadInit;
slot->slot_initdata = data; slot->slot_initdata = data;
slot->SlotFunc = tm->Func; slot->SlotFunc = tm->Func;

@ -30,6 +30,9 @@
#include "tm-modules.h" #include "tm-modules.h"
typedef struct TmSlot_ { typedef struct TmSlot_ {
/* the TV holding this slot */
ThreadVars *tv;
/* function pointers */ /* function pointers */
TmEcode (*SlotFunc)(ThreadVars *, Packet *, void *, PacketQueue *, TmEcode (*SlotFunc)(ThreadVars *, Packet *, void *, PacketQueue *,
PacketQueue *); PacketQueue *);

Loading…
Cancel
Save