diff --git a/src/threadvars.h b/src/threadvars.h index 441054e82b..09a41db711 100644 --- a/src/threadvars.h +++ b/src/threadvars.h @@ -103,7 +103,7 @@ typedef struct ThreadVars_ { /** outgoing queue and handler */ Tmq *outq; void *outctx; - void (*tmqh_out)(struct ThreadVars_ *, struct Packet_ *); + void (*TmqhOutFn)(struct ThreadVars_ *, struct Packet_ *); /** Queue for decoders to temporarily store extra packets they * generate. These packets are generated as part of the tunnel diff --git a/src/tm-threads.c b/src/tm-threads.c index ce8b662ce5..539c484e12 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -316,11 +316,11 @@ static void *TmThreadsSlotPktAcqLoop(void *td) TmEcode r = TM_ECODE_OK; /* check if we are setup properly */ - if (s == NULL || s->PktAcqLoop == NULL || tv->TmqhInFn == NULL || tv->tmqh_out == NULL) { + if (s == NULL || s->PktAcqLoop == NULL || tv->TmqhInFn == NULL || tv->TmqhOutFn == NULL) { SCLogError("TmSlot or ThreadVars badly setup: s=%p," " PktAcqLoop=%p, TmqhInFn=%p," - " tmqh_out=%p", - s, s ? s->PktAcqLoop : NULL, tv->TmqhInFn, tv->tmqh_out); + " TmqhOutFn=%p", + s, s ? s->PktAcqLoop : NULL, tv->TmqhInFn, tv->TmqhOutFn); TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit(NULL); return NULL; @@ -386,10 +386,10 @@ static void *TmThreadsLib(void *td) TmSlot *s = tv->tm_slots; /* check if we are setup properly */ - if (s == NULL || tv->TmqhInFn == NULL || tv->tmqh_out == NULL) { + if (s == NULL || tv->TmqhInFn == NULL || tv->TmqhOutFn == NULL) { SCLogError("TmSlot or ThreadVars badly setup: s=%p, TmqhInFn=%p," - " tmqh_out=%p", - s, tv->TmqhInFn, tv->tmqh_out); + " TmqhOutFn=%p", + s, tv->TmqhInFn, tv->TmqhOutFn); TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); return NULL; } @@ -428,7 +428,7 @@ static void *TmThreadsSlotVar(void *td) SCDropCaps(tv); /* check if we are setup properly */ - if (s == NULL || tv->TmqhInFn == NULL || tv->tmqh_out == NULL) { + if (s == NULL || tv->TmqhInFn == NULL || tv->TmqhOutFn == NULL) { TmThreadsSetFlag(tv, THV_CLOSED | THV_RUNNING_DONE); pthread_exit(NULL); return NULL; @@ -513,7 +513,7 @@ static void *TmThreadsSlotVar(void *td) } /* output the packet */ - tv->tmqh_out(tv, p); + tv->TmqhOutFn(tv, p); /* now handle the stream pq packets */ TmThreadsHandleInjectedPackets(tv); @@ -1005,7 +1005,7 @@ ThreadVars *TmThreadCreate(const char *name, const char *inq_name, const char *i if (tmqh == NULL) goto error; - tv->tmqh_out = tmqh->OutHandler; + tv->TmqhOutFn = tmqh->OutHandler; tv->outq_id = (uint8_t)id; if (outq_name != NULL && strcmp(outq_name, "packetpool") != 0) { diff --git a/src/tm-threads.h b/src/tm-threads.h index 97e57c9fe6..b92fc4b017 100644 --- a/src/tm-threads.h +++ b/src/tm-threads.h @@ -180,7 +180,7 @@ static inline bool TmThreadsHandleInjectedPackets(ThreadVars *tv) TmThreadsSlotProcessPktFail(tv, extra_p); break; } - tv->tmqh_out(tv, extra_p); + tv->TmqhOutFn(tv, extra_p); } return true; } else { @@ -194,7 +194,7 @@ static inline bool TmThreadsHandleInjectedPackets(ThreadVars *tv) static inline TmEcode TmThreadsSlotProcessPkt(ThreadVars *tv, TmSlot *s, Packet *p) { if (s == NULL) { - tv->tmqh_out(tv, p); + tv->TmqhOutFn(tv, p); return TM_ECODE_OK; } @@ -204,7 +204,7 @@ static inline TmEcode TmThreadsSlotProcessPkt(ThreadVars *tv, TmSlot *s, Packet return TM_ECODE_FAILED; } - tv->tmqh_out(tv, p); + tv->TmqhOutFn(tv, p); TmThreadsHandleInjectedPackets(tv); @@ -257,7 +257,7 @@ static inline void TmThreadsCaptureHandleTimeout(ThreadVars *tv, Packet *p) /* packet could have been passed to us that we won't use * return it to the pool. */ if (p != NULL) - tv->tmqh_out(tv, p); + tv->TmqhOutFn(tv, p); } static inline void TmThreadsCaptureBreakLoop(ThreadVars *tv)