counters: remove ThreadVars from API

pull/14398/head
Victor Julien 11 months ago
parent 4234567bb9
commit 3f4af00fdd

@ -279,7 +279,7 @@ static int AlertFastLogTest01(void)
Packet *p = NULL;
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
@ -306,7 +306,7 @@ static int AlertFastLogTest01(void)
UTHFreePackets(&p, 1);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -319,7 +319,7 @@ static int AlertFastLogTest02(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
@ -346,7 +346,7 @@ static int AlertFastLogTest02(void)
UTHFreePackets(&p, 1);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -3164,7 +3164,7 @@ static int AppLayerProtoDetectTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacket(NULL, 0, IPPROTO_TCP);
@ -3237,7 +3237,7 @@ static int AppLayerProtoDetectTest16(void)
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return result;
}
@ -3261,7 +3261,7 @@ static int AppLayerProtoDetectTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacketSrcDstPorts(http_buf1, http_buf1_len, IPPROTO_TCP, 12345, 88);
@ -3328,7 +3328,7 @@ static int AppLayerProtoDetectTest17(void)
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return result;
}
@ -3352,7 +3352,7 @@ static int AppLayerProtoDetectTest18(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacket(http_buf1, http_buf1_len, IPPROTO_TCP);
@ -3418,7 +3418,7 @@ static int AppLayerProtoDetectTest18(void)
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return result;
}
@ -3439,7 +3439,7 @@ static int AppLayerProtoDetectTest19(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&ssn, 0, sizeof(TcpSession));
p = UTHBuildPacketSrcDstPorts(http_buf1, http_buf1_len, IPPROTO_TCP, 12345, 88);
@ -3500,7 +3500,7 @@ static int AppLayerProtoDetectTest19(void)
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return result;
}

@ -5536,7 +5536,7 @@ libhtp:\n\
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -5631,7 +5631,7 @@ libhtp:\n\
SCConfDeInit();
SCConfRestoreContextBackup();
HtpConfigRestoreBackup();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -379,7 +379,7 @@ static int ModbusParserTest03(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -457,7 +457,7 @@ static int ModbusParserTest03(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -513,7 +513,7 @@ static int ModbusParserTest05(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -565,7 +565,7 @@ static int ModbusParserTest05(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -583,7 +583,7 @@ static int ModbusParserTest06(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -635,7 +635,7 @@ static int ModbusParserTest06(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -653,7 +653,7 @@ static int ModbusParserTest07(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -706,7 +706,7 @@ static int ModbusParserTest07(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -724,7 +724,7 @@ static int ModbusParserTest08(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -788,7 +788,7 @@ static int ModbusParserTest08(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -936,7 +936,7 @@ static int ModbusParserTest11(void)
FAIL_IF(alp_tctx == NULL);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -987,7 +987,7 @@ static int ModbusParserTest11(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
SCFree(input);
PASS;
}
@ -1005,7 +1005,7 @@ static int ModbusParserTest12(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -1058,7 +1058,7 @@ static int ModbusParserTest12(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1166,7 +1166,7 @@ static int ModbusParserTest15(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1231,7 +1231,7 @@ static int ModbusParserTest15(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1249,7 +1249,7 @@ static int ModbusParserTest16(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1322,7 +1322,7 @@ static int ModbusParserTest16(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1429,7 +1429,7 @@ static int ModbusParserTest19(void)
FAIL_IF_NULL(alp_tctx);
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -1482,7 +1482,7 @@ static int ModbusParserTest19(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
#endif /* UNITTESTS */

@ -3552,7 +3552,7 @@ static int SMTPParserTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3635,7 +3635,7 @@ end:
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3687,7 +3687,7 @@ static int SMTPParserTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3784,7 +3784,7 @@ end:
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -1389,7 +1389,7 @@ void AppLayerDeSetupCounters(void)
memset(&pq, 0, sizeof(PacketQueueNoLock)); \
memset(&f, 0, sizeof(Flow)); \
memset(&tv, 0, sizeof(ThreadVars)); \
StatsThreadInit(&tv); \
StatsThreadInit(&tv.stats); \
memset(&tcph, 0, sizeof(TCPHdr)); \
\
FLOW_INITIALIZE(&f); \
@ -1468,7 +1468,7 @@ void AppLayerDeSetupCounters(void)
PacketFree(p); \
FLOW_DESTROY(&f); \
IPPairShutdown(); \
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
/**
* \test GET -> HTTP/1.1

@ -1237,14 +1237,14 @@ static int StatsGetAllCountersArray(
return 0;
}
int StatsSetupPrivate(ThreadVars *tv)
int StatsSetupPrivate(StatsThreadContext *stats, const char *thread_name)
{
int r = StatsGetAllCountersArray(&tv->stats.pub, &tv->stats.priv);
int r = StatsGetAllCountersArray(&stats->pub, &stats->priv);
if (r < 0) {
return -1;
}
r = StatsThreadRegister(tv->printable_name ? tv->printable_name : tv->name, &tv->stats.pub);
r = StatsThreadRegister(thread_name, &stats->pub);
if (r != 1) {
return -2;
}
@ -1257,9 +1257,9 @@ static void StatsThreadInitPublic(StatsPublicThreadContext *pctx)
SCSpinInit(&pctx->lock, 0);
}
void StatsThreadInit(ThreadVars *tv)
void StatsThreadInit(StatsThreadContext *stats)
{
StatsThreadInitPublic(&tv->stats.pub);
StatsThreadInitPublic(&stats->pub);
}
/**
@ -1353,10 +1353,10 @@ static void StatsReleasePrivateThreadContext(StatsPrivateThreadContext *pca)
}
}
void StatsThreadCleanup(ThreadVars *tv)
void StatsThreadCleanup(StatsThreadContext *stats)
{
StatsPublicThreadContextCleanup(&tv->stats.pub);
StatsReleasePrivateThreadContext(&tv->stats.priv);
StatsPublicThreadContextCleanup(&stats->pub);
StatsReleasePrivateThreadContext(&stats->priv);
}
/*----------------------------------Unit_Tests--------------------------------*/
@ -1428,12 +1428,12 @@ static int StatsTestGetCntArray05(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.stats.pub);
FAIL_IF(c1.id != 1);
int r = StatsGetAllCountersArray(NULL, &tv.stats.priv);
FAIL_IF_NOT(r == -1);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1441,13 +1441,13 @@ static int StatsTestGetCntArray06(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.stats.pub);
FAIL_IF(c1.id != 1);
StatsThreadSetupPublic(&tv.stats.pub);
int r = StatsGetAllCountersArray(&tv.stats.pub, &tv.stats.priv);
FAIL_IF_NOT(r == 0);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1455,7 +1455,7 @@ static int StatsTestCntArraySize07(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
StatsPrivateThreadContext *pca = NULL;
StatsCounterId id1 = RegisterCounter("t1", "c1", &tv.stats.pub);
@ -1470,7 +1470,7 @@ static int StatsTestCntArraySize07(void)
FAIL_IF_NOT(pca->size == 3);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1478,7 +1478,7 @@ static int StatsTestUpdateCounter08(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.stats.pub);
StatsThreadSetupPublic(&tv.stats.pub);
StatsGetAllCountersArray(&tv.stats.pub, &tv.stats.priv);
@ -1488,7 +1488,7 @@ static int StatsTestUpdateCounter08(void)
StatsAddUI64(&tv, c1, 100);
FAIL_IF_NOT(pca->head[c1.id].v == 101);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1496,7 +1496,7 @@ static int StatsTestUpdateCounter09(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.stats.pub);
RegisterCounter("t2", "c2", &tv.stats.pub);
@ -1514,7 +1514,7 @@ static int StatsTestUpdateCounter09(void)
FAIL_IF_NOT(pca->head[c1.id].v == 0);
FAIL_IF_NOT(pca->head[c5.id].v == 101);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1522,7 +1522,7 @@ static int StatsTestUpdateGlobalCounter10(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.stats.pub);
StatsCounterId c2 = RegisterCounter("t2", "c2", &tv.stats.pub);
@ -1543,7 +1543,7 @@ static int StatsTestUpdateGlobalCounter10(void)
FAIL_IF_NOT(100 == tv.stats.pub.copy_of_private[c2.id].v);
FAIL_IF_NOT(101 == tv.stats.pub.copy_of_private[c3.id].v);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1551,7 +1551,7 @@ static int StatsTestCounterValues11(void)
{
ThreadVars tv;
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
StatsCounterId c1 = RegisterCounter("t1", "c1", &tv.stats.pub);
StatsCounterId c2 = RegisterCounter("t2", "c2", &tv.stats.pub);
@ -1574,7 +1574,7 @@ static int StatsTestCounterValues11(void)
FAIL_IF_NOT(257 == tv.stats.pub.copy_of_private[c3.id].v);
FAIL_IF_NOT(16843024 == tv.stats.pub.copy_of_private[c4.id].v);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -149,9 +149,9 @@ void StatsCounterAvgAddI64(struct ThreadVars_ *tv, StatsCounterAvgId id, int64_t
/* utility functions */
uint64_t StatsGetLocalCounterValue(struct ThreadVars_ *, StatsCounterId);
void StatsThreadInit(struct ThreadVars_ *);
int StatsSetupPrivate(struct ThreadVars_ *);
void StatsThreadCleanup(struct ThreadVars_ *);
void StatsThreadInit(StatsThreadContext *);
int StatsSetupPrivate(StatsThreadContext *, const char *);
void StatsThreadCleanup(StatsThreadContext *);
void StatsSyncCounters(struct ThreadVars_ *tv);
void StatsSyncCountersIfSignalled(struct ThreadVars_ *tv);

@ -373,7 +373,7 @@ static int DetectBase64DecodeTestDecode(void)
};
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;
@ -410,7 +410,7 @@ end:
if (p != NULL) {
UTHFreePacket(p);
}
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return retval;
}
@ -430,7 +430,7 @@ static int DetectBase64DecodeTestDecodeWithOffset(void)
char decoded[] = "Hello World";
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;
@ -472,7 +472,7 @@ end:
if (p != NULL) {
UTHFreePacket(p);
}
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return retval;
}
@ -490,7 +490,7 @@ static int DetectBase64DecodeTestDecodeLargeOffset(void)
};
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;
@ -528,7 +528,7 @@ end:
if (p != NULL) {
UTHFreePacket(p);
}
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return retval;
}
@ -548,7 +548,7 @@ static int DetectBase64DecodeTestDecodeRelative(void)
char decoded[] = "Hello World";
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
if ((de_ctx = DetectEngineCtxInit()) == NULL) {
goto end;
@ -589,7 +589,7 @@ end:
if (p != NULL) {
UTHFreePacket(p);
}
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return retval;
}

@ -812,7 +812,7 @@ static int DetectByteMathPacket01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP,
@ -897,7 +897,7 @@ static int DetectByteMathPacket01(void)
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -914,7 +914,7 @@ static int DetectByteMathPacket02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP, "192.168.1.5", "192.168.1.1", 41424, 53);
@ -1000,7 +1000,7 @@ static int DetectByteMathPacket02(void)
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -1094,7 +1094,7 @@ static int DetectContentLongPatternMatchTest(uint8_t *raw_eth_pkt, uint16_t pkts
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth_pkt, pktsize);
@ -1126,7 +1126,7 @@ static int DetectContentLongPatternMatchTest(uint8_t *raw_eth_pkt, uint16_t pkts
FlowShutdown();
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1905,7 +1905,7 @@ static int SigTestPositiveTestContent(const char *rule, uint8_t *buf)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
@ -1927,7 +1927,7 @@ static int SigTestPositiveTestContent(const char *rule, uint8_t *buf)
UTHFreePackets(&p, 1);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2094,7 +2094,7 @@ static int SigTestNegativeTestContent(const char *rule, uint8_t *buf)
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
@ -2126,7 +2126,7 @@ end:
if (de_ctx != NULL) {
DetectEngineCtxFree(de_ctx);
}
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -935,7 +935,7 @@ static int DetectCsumICMPV6Test01(void)
PacketCopyData(p, pkt, sizeof(pkt));
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&dtv, 0, sizeof(dtv));
StreamTcpInitConfig(true);
@ -963,7 +963,7 @@ static int DetectCsumICMPV6Test01(void)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -638,7 +638,7 @@ static int DetectDceStubDataTestParse02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -745,7 +745,7 @@ static int DetectDceStubDataTestParse02(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1188,7 +1188,7 @@ static int DetectDceStubDataTestParse03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1242,7 +1242,7 @@ static int DetectDceStubDataTestParse03(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1372,7 +1372,7 @@ static int DetectDceStubDataTestParse04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1555,7 +1555,7 @@ static int DetectDceStubDataTestParse04(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1658,7 +1658,7 @@ static int DetectDceStubDataTestParse05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1830,7 +1830,7 @@ static int DetectDceStubDataTestParse05(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -381,7 +381,7 @@ static int DetectDetectionFilterTestSig1(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacketReal(NULL, 0, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -420,7 +420,7 @@ static int DetectDetectionFilterTestSig1(void)
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -439,7 +439,7 @@ static int DetectDetectionFilterTestSig2(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacketReal(NULL, 0, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -483,7 +483,7 @@ static int DetectDetectionFilterTestSig2(void)
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -498,7 +498,7 @@ static int DetectDetectionFilterTestSig3(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacketReal(NULL, 0, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -560,7 +560,7 @@ static int DetectDetectionFilterTestSig3(void)
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -594,7 +594,7 @@ static int DetectDsizeIcmpv6Test01(void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
p->src.family = AF_INET6;
@ -629,7 +629,7 @@ static int DetectDsizeIcmpv6Test01(void)
PacketFree(p);
FlowShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -95,7 +95,7 @@ static int DcePayloadTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -140,7 +140,7 @@ static int DcePayloadTest15(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -179,7 +179,7 @@ static int DcePayloadTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -224,7 +224,7 @@ static int DcePayloadTest16(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -263,7 +263,7 @@ static int DcePayloadTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -308,7 +308,7 @@ static int DcePayloadTest17(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -346,7 +346,7 @@ static int DcePayloadTest18(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -391,7 +391,7 @@ static int DcePayloadTest18(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -429,7 +429,7 @@ static int DcePayloadTest19(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -474,7 +474,7 @@ static int DcePayloadTest19(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -512,7 +512,7 @@ static int DcePayloadTest20(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -557,7 +557,7 @@ static int DcePayloadTest20(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -645,7 +645,7 @@ static int PayloadTestSig13(void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -665,7 +665,7 @@ static int PayloadTestSig13(void)
UTHFreePacket(p);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -951,7 +951,7 @@ static int SigGroupHeadTest06(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacketSrcDst(NULL, 0, IPPROTO_ICMP, "192.168.1.1", "1.2.3.4");
FAIL_IF_NULL(p);
@ -987,7 +987,7 @@ static int SigGroupHeadTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
#endif

@ -467,7 +467,7 @@ static int DeStateSigTest01(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -525,7 +525,7 @@ static int DeStateSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -555,7 +555,7 @@ static int DeStateSigTest02(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -642,7 +642,7 @@ static int DeStateSigTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -668,7 +668,7 @@ static int DeStateSigTest03(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -729,7 +729,7 @@ static int DeStateSigTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -753,7 +753,7 @@ static int DeStateSigTest04(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -810,7 +810,7 @@ static int DeStateSigTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -835,7 +835,7 @@ static int DeStateSigTest05(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -895,7 +895,7 @@ static int DeStateSigTest05(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -920,7 +920,7 @@ static int DeStateSigTest06(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -979,7 +979,7 @@ static int DeStateSigTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1006,7 +1006,7 @@ static int DeStateSigTest07(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1067,7 +1067,7 @@ static int DeStateSigTest07(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1107,7 +1107,7 @@ static int DeStateSigTest08(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1198,7 +1198,7 @@ static int DeStateSigTest08(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1238,7 +1238,7 @@ static int DeStateSigTest09(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1327,7 +1327,7 @@ static int DeStateSigTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1367,7 +1367,7 @@ static int DeStateSigTest10(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
DetectEngineThreadCtx *det_ctx = NULL;
@ -1456,7 +1456,7 @@ static int DeStateSigTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -714,7 +714,7 @@ static int DetectTagTestPacket02 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
StorageCleanup();
StorageInit();
@ -800,7 +800,7 @@ static int DetectTagTestPacket02 (void)
HostShutdown();
TagDestroyCtx();
StorageCleanup();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -819,7 +819,7 @@ static int DetectTagTestPacket03 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
StorageCleanup();
StorageInit();
@ -902,7 +902,7 @@ static int DetectTagTestPacket03 (void)
HostShutdown();
TagDestroyCtx();
StorageCleanup();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -939,7 +939,7 @@ static int DetectTagTestPacket04 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1023,7 +1023,7 @@ static int DetectTagTestPacket04 (void)
HostShutdown();
TagDestroyCtx();
StorageCleanup();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1060,7 +1060,7 @@ static int DetectTagTestPacket05 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1149,7 +1149,7 @@ static int DetectTagTestPacket05 (void)
HostShutdown();
TagDestroyCtx();
StorageCleanup();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1186,7 +1186,7 @@ static int DetectTagTestPacket06 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1271,7 +1271,7 @@ static int DetectTagTestPacket06 (void)
HostShutdown();
TagDestroyCtx();
StorageCleanup();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1308,7 +1308,7 @@ static int DetectTagTestPacket07 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1392,7 +1392,7 @@ static int DetectTagTestPacket07 (void)
HostShutdown();
TagDestroyCtx();
StorageCleanup();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -1040,7 +1040,7 @@ static int DetectFastPatternTest14(void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
@ -1072,7 +1072,7 @@ static int DetectFastPatternTest14(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
FlowShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -1001,7 +1001,7 @@ static int DetectFlowSigTest01(void)
DecodeThreadVars dtv;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
@ -1028,7 +1028,7 @@ static int DetectFlowSigTest01(void)
DetectEngineCtxFree(de_ctx);
UTHFreePacket(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -1592,7 +1592,7 @@ static int FlowBitsTestSig06(void)
uint32_t idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(Flow));
memset(&flowvar, 0, sizeof(GenericVar));
@ -1637,7 +1637,7 @@ static int FlowBitsTestSig06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1667,7 +1667,7 @@ static int FlowBitsTestSig07(void)
uint32_t idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(Flow));
memset(&flowvar, 0, sizeof(GenericVar));
@ -1713,7 +1713,7 @@ static int FlowBitsTestSig07(void)
FLOW_DESTROY(&f);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1744,7 +1744,7 @@ static int FlowBitsTestSig08(void)
uint32_t idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(Flow));
memset(&flowvar, 0, sizeof(GenericVar));
@ -1790,7 +1790,7 @@ static int FlowBitsTestSig08(void)
FLOW_DESTROY(&f);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -1115,7 +1115,7 @@ static int DetectFlowintTestPacket01Real(void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF(de_ctx == NULL);
@ -1175,7 +1175,7 @@ static int DetectFlowintTestPacket01Real(void)
UTHFreeFlow(f);
DetectEngineThreadCtxDeinit(&th_v,(void *) det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1189,7 +1189,7 @@ static int DetectFlowintTestPacket02Real(void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF(de_ctx == NULL);
@ -1251,7 +1251,7 @@ static int DetectFlowintTestPacket02Real(void)
UTHFreeFlow(f);
DetectEngineThreadCtxDeinit(&th_v,(void *) det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1266,7 +1266,7 @@ static int DetectFlowintTestPacket03Real(void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF(de_ctx == NULL);
@ -1316,7 +1316,7 @@ static int DetectFlowintTestPacket03Real(void)
UTHFreeFlow(f);
DetectEngineThreadCtxDeinit(&th_v,(void *) det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -265,7 +265,7 @@ static int DetectFragOffsetMatchTest01 (void)
memset(&ip4h, 0, sizeof(IPV4Hdr));
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
@ -302,7 +302,7 @@ static int DetectFragOffsetMatchTest01 (void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
FlowShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -574,7 +574,7 @@ static int HostBitsTestSig01(void)
DetectEngineCtx *de_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -600,7 +600,7 @@ static int HostBitsTestSig01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
HostBitsTestShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -677,7 +677,7 @@ static int HostBitsTestSig03(void)
int idx = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -706,7 +706,7 @@ static int HostBitsTestSig03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
HostBitsTestShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -297,7 +297,7 @@ static int DetectIcmpIdMatchTest01 (void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(NULL, 0, IPPROTO_ICMP);
p->l4.vars.icmpv4.id = htons(21781);
@ -339,7 +339,7 @@ cleanup:
UTHFreePackets(&p, 1);
end:
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -373,7 +373,7 @@ static int DetectIcmpIdMatchTest02 (void)
memset(&ip4h, 0, sizeof(IPV4Hdr));
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
@ -416,7 +416,7 @@ cleanup:
FlowShutdown();
end:
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -333,7 +333,7 @@ static int DetectICodeMatchTest01(void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket(NULL, 0, IPPROTO_ICMP);
FAIL_IF_NULL(p);
@ -374,7 +374,7 @@ static int DetectICodeMatchTest01(void)
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -1918,7 +1918,7 @@ static int DetectIPProtoTestSig2(void)
p->proto = 0;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));
@ -1943,7 +1943,7 @@ static int DetectIPProtoTestSig2(void)
DetectEngineCtxFree(de_ctx);
PacketFree(p);
FlowShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1971,7 +1971,7 @@ static int DetectIPProtoTestSig3(void)
p->proto = 0;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));
@ -1996,7 +1996,7 @@ static int DetectIPProtoTestSig3(void)
FlowShutdown();
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -358,7 +358,7 @@ static int DetectIPRepTest01(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -394,7 +394,7 @@ static int DetectIPRepTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -410,7 +410,7 @@ static int DetectIPRepTest02(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -446,7 +446,7 @@ static int DetectIPRepTest02(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -462,7 +462,7 @@ static int DetectIPRepTest03(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -498,7 +498,7 @@ static int DetectIPRepTest03(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -514,7 +514,7 @@ static int DetectIPRepTest04(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -551,7 +551,7 @@ static int DetectIPRepTest04(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -567,7 +567,7 @@ static int DetectIPRepTest05(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -603,7 +603,7 @@ static int DetectIPRepTest05(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -619,7 +619,7 @@ static int DetectIPRepTest06(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -655,7 +655,7 @@ static int DetectIPRepTest06(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -671,7 +671,7 @@ static int DetectIPRepTest07(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -707,7 +707,7 @@ static int DetectIPRepTest07(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -723,7 +723,7 @@ static int DetectIPRepTest08(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -760,7 +760,7 @@ static int DetectIPRepTest08(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -776,7 +776,7 @@ static int DetectIPRepTest09(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -813,7 +813,7 @@ static int DetectIPRepTest09(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -841,7 +841,7 @@ static int DetectIPRepTest10(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -875,7 +875,7 @@ static int DetectIPRepTest10(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -891,7 +891,7 @@ static int DetectIPRepTest11(void)
HostInitConfig(HOST_QUIET);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NULL(de_ctx);
FAIL_IF_NULL(p);
@ -925,7 +925,7 @@ static int DetectIPRepTest11(void)
DetectEngineCtxFree(de_ctx);
HostShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -126,7 +126,7 @@ static int DetectL3protoTestSig1(void)
IPV4Hdr ip4h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->dst.family = AF_INET;
@ -167,7 +167,7 @@ static int DetectL3protoTestSig1(void)
DetectEngineCtxFree(de_ctx);
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -187,7 +187,7 @@ static int DetectL3protoTestSig2(void)
IPV6Hdr ip6h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET6;
p->dst.family = AF_INET6;
@ -228,7 +228,7 @@ static int DetectL3protoTestSig2(void)
DetectEngineCtxFree(de_ctx);
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -248,7 +248,7 @@ static int DetectL3protoTestSig3(void)
IPV6Hdr ip6h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET6;
p->dst.family = AF_INET6;
@ -289,7 +289,7 @@ static int DetectL3protoTestSig3(void)
DetectEngineCtxFree(de_ctx);
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -834,7 +834,7 @@ static int LuaMatchTest01(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -903,7 +903,7 @@ static int LuaMatchTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -956,7 +956,7 @@ static int LuaMatchTest01a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1025,7 +1025,7 @@ static int LuaMatchTest01a(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1078,7 +1078,7 @@ static int LuaMatchTest02(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1137,7 +1137,7 @@ static int LuaMatchTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1190,7 +1190,7 @@ static int LuaMatchTest02a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1247,7 +1247,7 @@ static int LuaMatchTest02a(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1301,7 +1301,7 @@ static int LuaMatchTest03(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1357,7 +1357,7 @@ static int LuaMatchTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1411,7 +1411,7 @@ static int LuaMatchTest03a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1467,7 +1467,7 @@ static int LuaMatchTest03a(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1519,7 +1519,7 @@ static int LuaMatchTest04(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1585,7 +1585,7 @@ static int LuaMatchTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1639,7 +1639,7 @@ static int LuaMatchTest04a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1705,7 +1705,7 @@ static int LuaMatchTest04a(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1752,7 +1752,7 @@ static int LuaMatchTest05(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1818,7 +1818,7 @@ static int LuaMatchTest05(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1865,7 +1865,7 @@ static int LuaMatchTest05a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1933,7 +1933,7 @@ static int LuaMatchTest05a(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1985,7 +1985,7 @@ static int LuaMatchTest06(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2051,7 +2051,7 @@ static int LuaMatchTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2103,7 +2103,7 @@ static int LuaMatchTest06a(void)
ut_script = script;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2169,7 +2169,7 @@ static int LuaMatchTest06a(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -4747,7 +4747,7 @@ static int SigTestBidirec04 (void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, rawpkt1_ether, sizeof(rawpkt1_ether));
@ -4779,7 +4779,7 @@ end:
if (p != NULL)
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -1726,7 +1726,7 @@ static int DetectPcreTxBodyChunksTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1846,7 +1846,7 @@ static int DetectPcreTxBodyChunksTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1876,7 +1876,7 @@ static int DetectPcreTxBodyChunksTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1979,7 +1979,7 @@ static int DetectPcreTxBodyChunksTest03(void)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -199,7 +199,7 @@ static int DetectQuicCyuHashTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP, "192.168.1.5", "192.168.1.1", 41424, 443);
@ -258,7 +258,7 @@ static int DetectQuicCyuHashTest01(void)
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -197,7 +197,7 @@ static int DetectQuicCyuStringTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
p = UTHBuildPacketReal(buf, sizeof(buf), IPPROTO_UDP, "192.168.1.5", "192.168.1.1", 41424, 443);
@ -257,7 +257,7 @@ static int DetectQuicCyuStringTest01(void)
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -238,7 +238,7 @@ int DetectReplaceLongPatternMatchTest(uint8_t *raw_eth_pkt, uint16_t pktsize,
ThreadVars th_v;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
if (pp == NULL) {
@ -298,7 +298,7 @@ end:
DetectEnginePruneFreeList();
PacketFree(p);
FlowShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -479,7 +479,7 @@ static int DetectRpcTestSig01(void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(buf, buflen, IPPROTO_UDP);
@ -522,7 +522,7 @@ static int DetectRpcTestSig01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -118,7 +118,7 @@ static int DetectSameipSigTest01(void)
DetectEngineThreadCtx *det_ctx;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
/* First packet has same IPs */
Packet *p1 = UTHBuildPacketSrcDst(buf, buflen, IPPROTO_TCP, "1.2.3.4", "1.2.3.4");
@ -148,7 +148,7 @@ static int DetectSameipSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -187,7 +187,7 @@ static int DetectAckSigTest01(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
/* TCP w/ack=42 */
@ -244,7 +244,7 @@ static int DetectAckSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -574,7 +574,7 @@ static int DetectThresholdTestSig1(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -651,7 +651,7 @@ static int DetectThresholdTestSig1(void)
end:
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -676,7 +676,7 @@ static int DetectThresholdTestSig2(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -730,7 +730,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -747,7 +747,7 @@ static int DetectThresholdTestSig3(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
ThresholdInit();
Packet *p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -788,7 +788,7 @@ static int DetectThresholdTestSig3(void)
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -813,7 +813,7 @@ static int DetectThresholdTestSig4(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -863,7 +863,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -888,7 +888,7 @@ static int DetectThresholdTestSig5(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -954,7 +954,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -970,7 +970,7 @@ static int DetectThresholdTestSig6Ticks(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -1040,7 +1040,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1060,7 +1060,7 @@ static int DetectThresholdTestSig7(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1130,7 +1130,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1150,7 +1150,7 @@ static int DetectThresholdTestSig8(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1220,7 +1220,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1240,7 +1240,7 @@ static int DetectThresholdTestSig9(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1310,7 +1310,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1330,7 +1330,7 @@ static int DetectThresholdTestSig10(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1400,7 +1400,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1420,7 +1420,7 @@ static int DetectThresholdTestSig11(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1490,7 +1490,7 @@ cleanup:
end:
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1510,7 +1510,7 @@ static int DetectThresholdTestSig12(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
@ -1581,7 +1581,7 @@ end:
UTHFreePackets(&p, 1);
HostShutdown();
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1605,7 +1605,7 @@ static int DetectThresholdTestSig13(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
FAIL_IF_NULL(p);
@ -1652,7 +1652,7 @@ static int DetectThresholdTestSig13(void)
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1678,7 +1678,7 @@ static int DetectThresholdTestSig14(void)
ThresholdInit();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p1 = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
p2 = UTHBuildPacketReal((uint8_t *)"A", 1, IPPROTO_TCP, "1.1.1.1", "3.3.3.3", 1024, 80);
FAIL_IF_NULL(p1);
@ -1737,7 +1737,7 @@ static int DetectThresholdTestSig14(void)
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -464,7 +464,7 @@ static int DetectUrilenSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -518,7 +518,7 @@ static int DetectUrilenSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -552,7 +552,7 @@ static int XBitsTestSig01(void)
DetectEngineCtx *de_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -576,7 +576,7 @@ static int XBitsTestSig01(void)
DetectEngineCtxFree(de_ctx);
XBitsTestShutdown();
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
StatsReleaseResources();
PASS;
}

@ -34,7 +34,7 @@ extern thread_local uint32_t ut_inspection_recursion_counter;
#define TEST_HEADER \
ThreadVars tv; \
memset(&tv, 0, sizeof(tv)); \
StatsThreadInit(&tv); \
StatsThreadInit(&tv.stats); \
Flow f; \
memset(&f, 0, sizeof(f));
@ -57,7 +57,7 @@ extern thread_local uint32_t ut_inspection_recursion_counter;
FAIL_IF_NOT(ut_inspection_recursion_counter == (steps)); \
DetectEngineThreadCtxDeinit(&tv, det_ctx); \
DetectEngineCtxFree(de_ctx); \
StatsThreadCleanup(&tv); \
StatsThreadCleanup(&tv.stats); \
}
#define TEST_FOOTER \
PASS

@ -121,7 +121,7 @@ static int RunTest (struct TestSteps *steps, const char *sig, const char *yaml)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -195,7 +195,7 @@ static int RunTest (struct TestSteps *steps, const char *sig, const char *yaml)
HtpConfigRestoreBackup();
SCConfRestoreContextBackup();
}
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -941,7 +941,7 @@ static int DetectHttpClientBodyTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1011,7 +1011,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1045,7 +1045,7 @@ static int DetectHttpClientBodyTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1134,7 +1134,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1168,7 +1168,7 @@ static int DetectHttpClientBodyTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1260,7 +1260,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1294,7 +1294,7 @@ static int DetectHttpClientBodyTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1386,7 +1386,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1420,7 +1420,7 @@ static int DetectHttpClientBodyTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1512,7 +1512,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1542,7 +1542,7 @@ static int DetectHttpClientBodyTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1612,7 +1612,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1642,7 +1642,7 @@ static int DetectHttpClientBodyTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1712,7 +1712,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1742,7 +1742,7 @@ static int DetectHttpClientBodyTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1813,7 +1813,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1844,7 +1844,7 @@ static int DetectHttpClientBodyTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2012,7 +2012,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2043,7 +2043,7 @@ static int DetectHttpClientBodyTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2245,7 +2245,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -63,7 +63,7 @@ static int DetectEngineHttpCookieTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -110,7 +110,7 @@ static int DetectEngineHttpCookieTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -131,7 +131,7 @@ static int DetectEngineHttpCookieTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -178,7 +178,7 @@ static int DetectEngineHttpCookieTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -199,7 +199,7 @@ static int DetectEngineHttpCookieTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -246,7 +246,7 @@ static int DetectEngineHttpCookieTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -267,7 +267,7 @@ static int DetectEngineHttpCookieTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -314,7 +314,7 @@ static int DetectEngineHttpCookieTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -335,7 +335,7 @@ static int DetectEngineHttpCookieTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -382,7 +382,7 @@ static int DetectEngineHttpCookieTest05(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -403,7 +403,7 @@ static int DetectEngineHttpCookieTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -450,7 +450,7 @@ static int DetectEngineHttpCookieTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -471,7 +471,7 @@ static int DetectEngineHttpCookieTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -518,7 +518,7 @@ static int DetectEngineHttpCookieTest07(void)
StreamTcpFreeConfig(true);
UTHFreePackets(&p, 1);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -539,7 +539,7 @@ static int DetectEngineHttpCookieTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -586,7 +586,7 @@ static int DetectEngineHttpCookieTest08(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -607,7 +607,7 @@ static int DetectEngineHttpCookieTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -654,7 +654,7 @@ static int DetectEngineHttpCookieTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -675,7 +675,7 @@ static int DetectEngineHttpCookieTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -723,7 +723,7 @@ static int DetectEngineHttpCookieTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -744,7 +744,7 @@ static int DetectEngineHttpCookieTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -792,7 +792,7 @@ static int DetectEngineHttpCookieTest11(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -813,7 +813,7 @@ static int DetectEngineHttpCookieTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -861,7 +861,7 @@ static int DetectEngineHttpCookieTest12(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -882,7 +882,7 @@ static int DetectEngineHttpCookieTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -930,7 +930,7 @@ static int DetectEngineHttpCookieTest13(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -951,7 +951,7 @@ static int DetectEngineHttpCookieTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -999,7 +999,7 @@ static int DetectEngineHttpCookieTest14(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1020,7 +1020,7 @@ static int DetectEngineHttpCookieTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1068,7 +1068,7 @@ static int DetectEngineHttpCookieTest15(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1089,7 +1089,7 @@ static int DetectEngineHttpCookieTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1137,7 +1137,7 @@ static int DetectEngineHttpCookieTest16(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1158,7 +1158,7 @@ static int DetectEngineHttpCookieTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1206,7 +1206,7 @@ static int DetectEngineHttpCookieTest17(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1257,7 +1257,7 @@ static int DetectHttpCookieSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1309,7 +1309,7 @@ static int DetectHttpCookieSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1325,7 +1325,7 @@ static int DetectHttpCookieSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1372,7 +1372,7 @@ static int DetectHttpCookieSigTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1389,7 +1389,7 @@ static int DetectHttpCookieSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1436,7 +1436,7 @@ static int DetectHttpCookieSigTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1453,7 +1453,7 @@ static int DetectHttpCookieSigTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1500,7 +1500,7 @@ static int DetectHttpCookieSigTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1517,7 +1517,7 @@ static int DetectHttpCookieSigTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1564,7 +1564,7 @@ static int DetectHttpCookieSigTest05(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1581,7 +1581,7 @@ static int DetectHttpCookieSigTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1628,7 +1628,7 @@ static int DetectHttpCookieSigTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1645,7 +1645,7 @@ static int DetectHttpCookieSigTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1692,7 +1692,7 @@ static int DetectHttpCookieSigTest07(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1718,7 +1718,7 @@ static int DetectHttpCookieSigTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1784,7 +1784,7 @@ static int DetectHttpCookieSigTest08(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1810,7 +1810,7 @@ static int DetectHttpCookieSigTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1878,7 +1878,7 @@ static int DetectHttpCookieSigTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -112,7 +112,7 @@ static int DetectHttpHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -182,7 +182,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -214,7 +214,7 @@ static int DetectHttpHeaderTest07(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -281,7 +281,7 @@ static int DetectHttpHeaderTest07(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -313,7 +313,7 @@ static int DetectHttpHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -405,7 +405,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -438,7 +438,7 @@ static int DetectHttpHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -531,7 +531,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -564,7 +564,7 @@ static int DetectHttpHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -656,7 +656,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -686,7 +686,7 @@ static int DetectHttpHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -756,7 +756,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -786,7 +786,7 @@ static int DetectHttpHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -856,7 +856,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -886,7 +886,7 @@ static int DetectHttpHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -957,7 +957,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -981,7 +981,7 @@ static int DetectHttpHeaderTest28(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1043,7 +1043,7 @@ static int DetectHttpHeaderTest28(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1067,7 +1067,7 @@ static int DetectHttpHeaderTest29(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1129,7 +1129,7 @@ static int DetectHttpHeaderTest29(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1153,7 +1153,7 @@ static int DetectHttpHeaderTest30(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1215,7 +1215,7 @@ static int DetectHttpHeaderTest30(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1266,7 +1266,7 @@ static int DetectEngineHttpHeaderTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1336,7 +1336,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1361,7 +1361,7 @@ static int DetectEngineHttpHeaderTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1431,7 +1431,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1456,7 +1456,7 @@ static int DetectEngineHttpHeaderTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1526,7 +1526,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1551,7 +1551,7 @@ static int DetectEngineHttpHeaderTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1621,7 +1621,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1646,7 +1646,7 @@ static int DetectEngineHttpHeaderTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1716,7 +1716,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1741,7 +1741,7 @@ static int DetectEngineHttpHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1811,7 +1811,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1836,7 +1836,7 @@ static int DetectEngineHttpHeaderTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1906,7 +1906,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1931,7 +1931,7 @@ static int DetectEngineHttpHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2001,7 +2001,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2026,7 +2026,7 @@ static int DetectEngineHttpHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2096,7 +2096,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2121,7 +2121,7 @@ static int DetectEngineHttpHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2191,7 +2191,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2216,7 +2216,7 @@ static int DetectEngineHttpHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2286,7 +2286,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2311,7 +2311,7 @@ static int DetectEngineHttpHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2381,7 +2381,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2406,7 +2406,7 @@ static int DetectEngineHttpHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2476,7 +2476,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2501,7 +2501,7 @@ static int DetectEngineHttpHeaderTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2571,7 +2571,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2596,7 +2596,7 @@ static int DetectEngineHttpHeaderTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2666,7 +2666,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2691,7 +2691,7 @@ static int DetectEngineHttpHeaderTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2761,7 +2761,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2786,7 +2786,7 @@ static int DetectEngineHttpHeaderTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2856,7 +2856,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2882,7 +2882,7 @@ static int DetectEngineHttpHeaderTest20(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2977,7 +2977,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3003,7 +3003,7 @@ static int DetectEngineHttpHeaderTest21(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3098,7 +3098,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3124,7 +3124,7 @@ static int DetectEngineHttpHeaderTest22(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3219,7 +3219,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3245,7 +3245,7 @@ static int DetectEngineHttpHeaderTest23(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3340,7 +3340,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3366,7 +3366,7 @@ static int DetectEngineHttpHeaderTest24(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3461,7 +3461,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3487,7 +3487,7 @@ static int DetectEngineHttpHeaderTest25(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3582,7 +3582,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3608,7 +3608,7 @@ static int DetectEngineHttpHeaderTest26(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3703,7 +3703,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3729,7 +3729,7 @@ static int DetectEngineHttpHeaderTest27(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3824,7 +3824,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3855,7 +3855,7 @@ static int DetectEngineHttpHeaderTest28(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -3946,7 +3946,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3977,7 +3977,7 @@ static int DetectEngineHttpHeaderTest29(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4071,7 +4071,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -4133,7 +4133,7 @@ static int DetectEngineHttpHeaderTest30(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4227,7 +4227,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -4254,7 +4254,7 @@ static int DetectEngineHttpHeaderTest31(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4328,7 +4328,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -4359,7 +4359,7 @@ static int DetectEngineHttpHeaderTest32(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4430,7 +4430,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -4465,7 +4465,7 @@ static int DetectEngineHttpHeaderTest33(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4530,7 +4530,7 @@ static int DetectEngineHttpHeaderTest33(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -4566,7 +4566,7 @@ static int DetectEngineHttpHeaderTest34(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4646,7 +4646,7 @@ static int DetectEngineHttpHeaderTest34(void)
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
UTHFreePackets(&p3, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -4682,7 +4682,7 @@ static int DetectEngineHttpHeaderTest35(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -4762,7 +4762,7 @@ static int DetectEngineHttpHeaderTest35(void)
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
UTHFreePackets(&p3, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -54,7 +54,7 @@ static int RunTest(const uint8_t *buf, const uint32_t size, const char *sig_str,
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -99,7 +99,7 @@ static int RunTest(const uint8_t *buf, const uint32_t size, const char *sig_str,
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
/**
@ -652,7 +652,7 @@ static int DetectHttpHHTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -717,7 +717,7 @@ static int DetectHttpHHTest07(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -743,7 +743,7 @@ static int DetectHttpHHTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -809,7 +809,7 @@ static int DetectHttpHHTest08(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -839,7 +839,7 @@ static int DetectHttpHHTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -905,7 +905,7 @@ static int DetectHttpHHTest09(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -937,7 +937,7 @@ static int DetectHttpHHTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1028,7 +1028,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1118,7 +1118,7 @@ static int DetectHttpHHTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1275,7 +1275,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1323,7 +1323,7 @@ static int DetectHttpHRHTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1411,7 +1411,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1439,7 +1439,7 @@ static int DetectHttpHRHTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1530,7 +1530,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1562,7 +1562,7 @@ static int DetectHttpHRHTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1653,7 +1653,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1685,7 +1685,7 @@ static int DetectHttpHRHTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1776,7 +1776,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1866,7 +1866,7 @@ static int DetectHttpHRHTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2023,7 +2023,7 @@ end:
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2055,7 +2055,7 @@ static int DetectHttpHRHTest37(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2146,7 +2146,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -63,7 +63,7 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -137,7 +137,7 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml)
HtpConfigRestoreBackup();
SCConfRestoreContextBackup();
}
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -470,7 +470,7 @@ static int DetectHttpMethodSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -526,7 +526,7 @@ static int DetectHttpMethodSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -545,7 +545,7 @@ static int DetectHttpMethodSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -599,7 +599,7 @@ static int DetectHttpMethodSigTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -617,7 +617,7 @@ static int DetectHttpMethodSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -664,7 +664,7 @@ static int DetectHttpMethodSigTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -684,7 +684,7 @@ static int DetectHttpMethodSigTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -737,7 +737,7 @@ static int DetectHttpMethodSigTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -138,7 +138,7 @@ static int DetectEngineHttpRawHeaderTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -187,7 +187,7 @@ static int DetectEngineHttpRawHeaderTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -207,7 +207,7 @@ static int DetectEngineHttpRawHeaderTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -255,7 +255,7 @@ static int DetectEngineHttpRawHeaderTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -275,7 +275,7 @@ static int DetectEngineHttpRawHeaderTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -325,7 +325,7 @@ static int DetectEngineHttpRawHeaderTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -345,7 +345,7 @@ static int DetectEngineHttpRawHeaderTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -393,7 +393,7 @@ static int DetectEngineHttpRawHeaderTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -413,7 +413,7 @@ static int DetectEngineHttpRawHeaderTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -461,7 +461,7 @@ static int DetectEngineHttpRawHeaderTest05(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -481,7 +481,7 @@ static int DetectEngineHttpRawHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -528,7 +528,7 @@ static int DetectEngineHttpRawHeaderTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -548,7 +548,7 @@ static int DetectEngineHttpRawHeaderTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -595,7 +595,7 @@ static int DetectEngineHttpRawHeaderTest07(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -615,7 +615,7 @@ static int DetectEngineHttpRawHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -662,7 +662,7 @@ static int DetectEngineHttpRawHeaderTest08(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -682,7 +682,7 @@ static int DetectEngineHttpRawHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -729,7 +729,7 @@ static int DetectEngineHttpRawHeaderTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -749,7 +749,7 @@ static int DetectEngineHttpRawHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -797,7 +797,7 @@ static int DetectEngineHttpRawHeaderTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -817,7 +817,7 @@ static int DetectEngineHttpRawHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -866,7 +866,7 @@ static int DetectEngineHttpRawHeaderTest11(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -886,7 +886,7 @@ static int DetectEngineHttpRawHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -935,7 +935,7 @@ static int DetectEngineHttpRawHeaderTest12(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -955,7 +955,7 @@ static int DetectEngineHttpRawHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1003,7 +1003,7 @@ static int DetectEngineHttpRawHeaderTest13(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1023,7 +1023,7 @@ static int DetectEngineHttpRawHeaderTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1071,7 +1071,7 @@ static int DetectEngineHttpRawHeaderTest14(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1091,7 +1091,7 @@ static int DetectEngineHttpRawHeaderTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1140,7 +1140,7 @@ static int DetectEngineHttpRawHeaderTest15(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1160,7 +1160,7 @@ static int DetectEngineHttpRawHeaderTest16(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1208,7 +1208,7 @@ static int DetectEngineHttpRawHeaderTest16(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1228,7 +1228,7 @@ static int DetectEngineHttpRawHeaderTest17(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1276,7 +1276,7 @@ static int DetectEngineHttpRawHeaderTest17(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1296,7 +1296,7 @@ static int DetectEngineHttpRawHeaderTest20(void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1361,7 +1361,7 @@ static int DetectEngineHttpRawHeaderTest20(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1382,7 +1382,7 @@ static int DetectEngineHttpRawHeaderTest21(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1444,7 +1444,7 @@ static int DetectEngineHttpRawHeaderTest21(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1465,7 +1465,7 @@ static int DetectEngineHttpRawHeaderTest22(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1528,7 +1528,7 @@ static int DetectEngineHttpRawHeaderTest22(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1549,7 +1549,7 @@ static int DetectEngineHttpRawHeaderTest23(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1612,7 +1612,7 @@ static int DetectEngineHttpRawHeaderTest23(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1633,7 +1633,7 @@ static int DetectEngineHttpRawHeaderTest24(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1696,7 +1696,7 @@ static int DetectEngineHttpRawHeaderTest24(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1717,7 +1717,7 @@ static int DetectEngineHttpRawHeaderTest25(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1779,7 +1779,7 @@ static int DetectEngineHttpRawHeaderTest25(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1800,7 +1800,7 @@ static int DetectEngineHttpRawHeaderTest26(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1862,7 +1862,7 @@ static int DetectEngineHttpRawHeaderTest26(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1883,7 +1883,7 @@ static int DetectEngineHttpRawHeaderTest27(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1945,7 +1945,7 @@ static int DetectEngineHttpRawHeaderTest27(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1972,7 +1972,7 @@ static int DetectEngineHttpRawHeaderTest28(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2033,7 +2033,7 @@ static int DetectEngineHttpRawHeaderTest28(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2060,7 +2060,7 @@ static int DetectEngineHttpRawHeaderTest29(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2121,7 +2121,7 @@ static int DetectEngineHttpRawHeaderTest29(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2148,7 +2148,7 @@ static int DetectEngineHttpRawHeaderTest31(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2196,7 +2196,7 @@ static int DetectEngineHttpRawHeaderTest31(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2225,7 +2225,7 @@ static int DetectEngineHttpRawHeaderTest32(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2287,7 +2287,7 @@ static int DetectEngineHttpRawHeaderTest32(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2313,7 +2313,7 @@ static int DetectHttpRawHeaderTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2361,7 +2361,7 @@ static int DetectHttpRawHeaderTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2390,7 +2390,7 @@ static int DetectHttpRawHeaderTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2450,7 +2450,7 @@ static int DetectHttpRawHeaderTest07(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2478,7 +2478,7 @@ static int DetectHttpRawHeaderTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2539,7 +2539,7 @@ static int DetectHttpRawHeaderTest08(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2568,7 +2568,7 @@ static int DetectHttpRawHeaderTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2629,7 +2629,7 @@ static int DetectHttpRawHeaderTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2658,7 +2658,7 @@ static int DetectHttpRawHeaderTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2719,7 +2719,7 @@ static int DetectHttpRawHeaderTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2745,7 +2745,7 @@ static int DetectHttpRawHeaderTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2793,7 +2793,7 @@ static int DetectHttpRawHeaderTest11(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2819,7 +2819,7 @@ static int DetectHttpRawHeaderTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2869,7 +2869,7 @@ static int DetectHttpRawHeaderTest12(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2895,7 +2895,7 @@ static int DetectHttpRawHeaderTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2946,7 +2946,7 @@ static int DetectHttpRawHeaderTest13(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -82,7 +82,7 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -158,7 +158,7 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml)
SCConfRestoreContextBackup();
EngineModeSetIDS();
}
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -866,7 +866,7 @@ static int DetectEngineHttpServerBodyFileDataTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -939,7 +939,7 @@ static int DetectEngineHttpServerBodyFileDataTest03(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2282,7 +2282,7 @@ static int DetectHttpServerBodyTest14(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2364,7 +2364,7 @@ static int DetectHttpServerBodyTest14(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2400,7 +2400,7 @@ static int DetectHttpServerBodyTest15(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2472,7 +2472,7 @@ static int DetectHttpServerBodyTest15(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2743,7 +2743,7 @@ static int DetectHttpServerBodyFileDataTest09(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2812,7 +2812,7 @@ static int DetectHttpServerBodyFileDataTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2848,7 +2848,7 @@ static int DetectHttpServerBodyFileDataTest10(void)
uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -2917,7 +2917,7 @@ static int DetectHttpServerBodyFileDataTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -62,7 +62,7 @@ static int DetectEngineHttpStatCodeTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -123,7 +123,7 @@ static int DetectEngineHttpStatCodeTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -148,7 +148,7 @@ static int DetectEngineHttpStatCodeTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -200,7 +200,7 @@ static int DetectEngineHttpStatCodeTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -227,7 +227,7 @@ static int DetectEngineHttpStatCodeTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -292,7 +292,7 @@ static int DetectEngineHttpStatCodeTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -317,7 +317,7 @@ static int DetectEngineHttpStatCodeTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -378,7 +378,7 @@ static int DetectEngineHttpStatCodeTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -403,7 +403,7 @@ static int DetectEngineHttpStatCodeTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -464,7 +464,7 @@ static int DetectEngineHttpStatCodeTest05(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -489,7 +489,7 @@ static int DetectEngineHttpStatCodeTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -550,7 +550,7 @@ static int DetectEngineHttpStatCodeTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -575,7 +575,7 @@ static int DetectEngineHttpStatCodeTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -636,7 +636,7 @@ static int DetectEngineHttpStatCodeTest07(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -661,7 +661,7 @@ static int DetectEngineHttpStatCodeTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -722,7 +722,7 @@ static int DetectEngineHttpStatCodeTest08(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -747,7 +747,7 @@ static int DetectEngineHttpStatCodeTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -809,7 +809,7 @@ static int DetectEngineHttpStatCodeTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -834,7 +834,7 @@ static int DetectEngineHttpStatCodeTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -896,7 +896,7 @@ static int DetectEngineHttpStatCodeTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -921,7 +921,7 @@ static int DetectEngineHttpStatCodeTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -983,7 +983,7 @@ static int DetectEngineHttpStatCodeTest11(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1008,7 +1008,7 @@ static int DetectEngineHttpStatCodeTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1070,7 +1070,7 @@ static int DetectEngineHttpStatCodeTest12(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1095,7 +1095,7 @@ static int DetectEngineHttpStatCodeTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1157,7 +1157,7 @@ static int DetectEngineHttpStatCodeTest13(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1182,7 +1182,7 @@ static int DetectEngineHttpStatCodeTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1244,7 +1244,7 @@ static int DetectEngineHttpStatCodeTest14(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1269,7 +1269,7 @@ static int DetectEngineHttpStatCodeTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1332,7 +1332,7 @@ static int DetectEngineHttpStatCodeTest15(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1350,7 +1350,7 @@ static int DetectHttpStatCodeSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1400,7 +1400,7 @@ static int DetectHttpStatCodeSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1418,7 +1418,7 @@ static int DetectHttpStatCodeSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1474,7 +1474,7 @@ static int DetectHttpStatCodeSigTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1493,7 +1493,7 @@ static int DetectHttpStatCodeSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1549,7 +1549,7 @@ static int DetectHttpStatCodeSigTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1568,7 +1568,7 @@ static int DetectHttpStatCodeSigTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1625,7 +1625,7 @@ static int DetectHttpStatCodeSigTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -62,7 +62,7 @@ static int DetectEngineHttpStatMsgTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -126,7 +126,7 @@ static int DetectEngineHttpStatMsgTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -151,7 +151,7 @@ static int DetectEngineHttpStatMsgTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -204,7 +204,7 @@ static int DetectEngineHttpStatMsgTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -231,7 +231,7 @@ static int DetectEngineHttpStatMsgTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -296,7 +296,7 @@ static int DetectEngineHttpStatMsgTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -321,7 +321,7 @@ static int DetectEngineHttpStatMsgTest04(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -382,7 +382,7 @@ static int DetectEngineHttpStatMsgTest04(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -407,7 +407,7 @@ static int DetectEngineHttpStatMsgTest05(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -468,7 +468,7 @@ static int DetectEngineHttpStatMsgTest05(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -493,7 +493,7 @@ static int DetectEngineHttpStatMsgTest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -554,7 +554,7 @@ static int DetectEngineHttpStatMsgTest06(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -579,7 +579,7 @@ static int DetectEngineHttpStatMsgTest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -640,7 +640,7 @@ static int DetectEngineHttpStatMsgTest07(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -665,7 +665,7 @@ static int DetectEngineHttpStatMsgTest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -726,7 +726,7 @@ static int DetectEngineHttpStatMsgTest08(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -751,7 +751,7 @@ static int DetectEngineHttpStatMsgTest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -813,7 +813,7 @@ static int DetectEngineHttpStatMsgTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -838,7 +838,7 @@ static int DetectEngineHttpStatMsgTest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -900,7 +900,7 @@ static int DetectEngineHttpStatMsgTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -925,7 +925,7 @@ static int DetectEngineHttpStatMsgTest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -987,7 +987,7 @@ static int DetectEngineHttpStatMsgTest11(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1012,7 +1012,7 @@ static int DetectEngineHttpStatMsgTest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1075,7 +1075,7 @@ static int DetectEngineHttpStatMsgTest12(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1100,7 +1100,7 @@ static int DetectEngineHttpStatMsgTest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1162,7 +1162,7 @@ static int DetectEngineHttpStatMsgTest13(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1187,7 +1187,7 @@ static int DetectEngineHttpStatMsgTest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1249,7 +1249,7 @@ static int DetectEngineHttpStatMsgTest14(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1274,7 +1274,7 @@ static int DetectEngineHttpStatMsgTest15(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1337,7 +1337,7 @@ static int DetectEngineHttpStatMsgTest15(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1355,7 +1355,7 @@ static int DetectHttpStatMsgSigTest01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1411,7 +1411,7 @@ static int DetectHttpStatMsgSigTest01(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1429,7 +1429,7 @@ static int DetectHttpStatMsgSigTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1479,7 +1479,7 @@ static int DetectHttpStatMsgSigTest02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1498,7 +1498,7 @@ static int DetectHttpStatMsgSigTest03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1555,7 +1555,7 @@ static int DetectHttpStatMsgSigTest03(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -56,7 +56,7 @@ static int DetectEngineHttpUATest(
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -102,7 +102,7 @@ static int DetectEngineHttpUATest(
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -444,7 +444,7 @@ static int DetectHttpUATest06(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -494,7 +494,7 @@ static int DetectHttpUATest06(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -521,7 +521,7 @@ static int DetectHttpUATest07(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -585,7 +585,7 @@ static int DetectHttpUATest07(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -612,7 +612,7 @@ static int DetectHttpUATest08(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -676,7 +676,7 @@ static int DetectHttpUATest08(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -707,7 +707,7 @@ static int DetectHttpUATest09(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -770,7 +770,7 @@ static int DetectHttpUATest09(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -801,7 +801,7 @@ static int DetectHttpUATest10(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -863,7 +863,7 @@ static int DetectHttpUATest10(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -888,7 +888,7 @@ static int DetectHttpUATest11(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -936,7 +936,7 @@ static int DetectHttpUATest11(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -960,7 +960,7 @@ static int DetectHttpUATest12(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1008,7 +1008,7 @@ static int DetectHttpUATest12(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1033,7 +1033,7 @@ static int DetectHttpUATest13(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1082,7 +1082,7 @@ static int DetectHttpUATest13(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1112,7 +1112,7 @@ static int DetectHttpUATest14(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -1204,7 +1204,7 @@ static int DetectHttpUATest14(void)
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -269,7 +269,7 @@ static int DetectTlsFingerprintTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -355,7 +355,7 @@ static int DetectTlsFingerprintTest02(void)
SigGroupCleanup(de_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -269,7 +269,7 @@ static int DetectTlsIssuerTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -355,7 +355,7 @@ static int DetectTlsIssuerTest02(void)
SigGroupCleanup(de_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -266,7 +266,7 @@ static int DetectTlsSerialTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -354,7 +354,7 @@ static int DetectTlsSerialTest02(void)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -269,7 +269,7 @@ static int DetectTlsSubjectTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -355,7 +355,7 @@ static int DetectTlsSubjectTest02(void)
SigGroupCleanup(de_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -633,7 +633,7 @@ static int ValidityTestDetect01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -723,7 +723,7 @@ static int ValidityTestDetect01(void)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -956,7 +956,7 @@ static int ExpiredTestDetect01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -1041,7 +1041,7 @@ static int ExpiredTestDetect01(void)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -1259,7 +1259,7 @@ static int ValidTestDetect01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -1344,7 +1344,7 @@ static int ValidTestDetect01(void)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -265,7 +265,7 @@ static int DetectTlsCertsTest02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -350,7 +350,7 @@ static int DetectTlsCertsTest02(void)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -166,7 +166,7 @@ static int DetectTtlTestSig1(void)
IPV4Hdr ip4h;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ip4h, 0, sizeof(ip4h));
p->src.family = AF_INET;
@ -203,7 +203,7 @@ static int DetectTtlTestSig1(void)
PacketFree(p);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}

@ -144,7 +144,7 @@ static int SigTest03 (void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -162,7 +162,7 @@ static int SigTest03 (void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -178,7 +178,7 @@ static int SigTest04 (void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -196,7 +196,7 @@ static int SigTest04 (void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -212,7 +212,7 @@ static int SigTest05 (void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -230,7 +230,7 @@ static int SigTest05 (void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -253,7 +253,7 @@ static int SigTest06 (void)
FAIL_IF_NULL(alp_tctx);
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -299,7 +299,7 @@ static int SigTest06 (void)
UTHFreePackets(&p, 1);
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -321,7 +321,7 @@ static int SigTest07 (void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -367,7 +367,7 @@ static int SigTest07 (void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -389,7 +389,7 @@ static int SigTest08 (void)
memset(&f, 0, sizeof(Flow));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&ssn, 0, sizeof(ssn));
Packet *p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -436,7 +436,7 @@ static int SigTest08 (void)
DetectEngineCtxFree(de_ctx);
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -457,7 +457,7 @@ static int SigTest09 (void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -505,7 +505,7 @@ static int SigTest09 (void)
AppLayerParserThreadCtxFree(alp_tctx);
UTHFreePackets(&p, 1);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -520,7 +520,7 @@ static int SigTest10 (void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -565,7 +565,7 @@ static int SigTest10 (void)
AppLayerParserThreadCtxFree(alp_tctx);
UTHFreePackets(&p, 1);
StreamTcpFreeConfig(true);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -582,7 +582,7 @@ static int SigTest11 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&f, 0, sizeof(f));
memset(&ssn, 0, sizeof(ssn));
@ -630,7 +630,7 @@ end:
UTHFreePackets(&p, 1);
StreamTcpFreeConfig(true);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -645,7 +645,7 @@ static int SigTest12 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Flow f;
memset(&f, 0, sizeof(Flow));
@ -685,7 +685,7 @@ end:
DetectEngineCtxFree(de_ctx);
}
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -700,7 +700,7 @@ static int SigTest13 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Flow f;
memset(&f, 0, sizeof(Flow));
@ -737,7 +737,7 @@ static int SigTest13 (void)
end:
UTHFreePackets(&p, 1);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -752,7 +752,7 @@ static int SigTest14 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -782,7 +782,7 @@ static int SigTest14 (void)
DetectEngineCtxFree(de_ctx);
end:
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -799,7 +799,7 @@ static int SigTest15 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -839,7 +839,7 @@ end:
SCConfDeInit();
SCConfRestoreContextBackup();
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -854,7 +854,7 @@ static int SigTest16 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&p, 0, sizeof(p));
p = UTHBuildPacketSrcDstPorts((uint8_t *)buf, buflen, IPPROTO_TCP, 12345, 1234);
@ -890,7 +890,7 @@ end:
SCConfDeInit();
SCConfRestoreContextBackup();
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -908,7 +908,7 @@ static int SigTest17 (void)
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacketSrcDstPorts((uint8_t *)buf, buflen, IPPROTO_TCP, 12345, 80);
FAIL_IF_NULL(p);
@ -939,7 +939,7 @@ static int SigTest17 (void)
SCConfDeInit();
SCConfRestoreContextBackup();
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -957,7 +957,7 @@ static int SigTest18 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -992,7 +992,7 @@ static int SigTest18 (void)
DetectEngineCtxFree(de_ctx);
end:
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1009,7 +1009,7 @@ static int SigTest19 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->src.addr_data32[0] = UTHSetIPv4Address("192.168.0.1");
p->dst.addr_data32[0] = UTHSetIPv4Address("1.2.3.4");
@ -1053,7 +1053,7 @@ end:
SCConfDeInit();
SCConfRestoreContextBackup();
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1070,7 +1070,7 @@ static int SigTest20 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->src.addr_data32[0] = UTHSetIPv4Address("192.168.0.1");
p->dst.addr_data32[0] = UTHSetIPv4Address("1.2.3.4");
@ -1114,7 +1114,7 @@ end:
SCConfDeInit();
SCConfRestoreContextBackup();
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1122,7 +1122,7 @@ static int SigTest21 (void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
@ -1191,7 +1191,7 @@ end:
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1199,7 +1199,7 @@ static int SigTest22 (void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
@ -1265,7 +1265,7 @@ end:
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1273,7 +1273,7 @@ static int SigTest23 (void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
@ -1339,7 +1339,7 @@ end:
UTHFreePackets(&p1, 1);
UTHFreePackets(&p2, 1);
FLOW_DESTROY(&f);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1372,7 +1372,7 @@ static int SigTest24IPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV4(p1, valid_raw_ipv4);
p1->src.family = AF_INET;
@ -1437,7 +1437,7 @@ end:
}
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1470,7 +1470,7 @@ static int SigTest25NegativeIPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV4(p1, valid_raw_ipv4);
p1->src.family = AF_INET;
@ -1532,7 +1532,7 @@ static int SigTest25NegativeIPV4Keyword(void)
end:
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1571,7 +1571,7 @@ static int SigTest26TCPV4Keyword(void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1626,7 +1626,7 @@ static int SigTest26TCPV4Keyword(void)
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1667,7 +1667,7 @@ static int SigTest26TCPV4AndNegativeIPV4Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1738,7 +1738,7 @@ end:
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1789,7 +1789,7 @@ static int SigTest26TCPV4AndIPV4Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1860,7 +1860,7 @@ end:
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -1898,7 +1898,7 @@ static int SigTest27NegativeTCPV4Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketCopyData(p1, raw_ipv4, sizeof(raw_ipv4));
PacketCopyDataOffset(p1, GET_PKT_LEN(p1), valid_raw_tcp, sizeof(valid_raw_tcp));
@ -1967,7 +1967,7 @@ end:
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2020,7 +2020,7 @@ static int SigTest28TCPV6Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetTCP(p1, (valid_raw_ipv6 + 54));
@ -2091,7 +2091,7 @@ end:
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2144,7 +2144,7 @@ static int SigTest29NegativeTCPV6Keyword(void)
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetTCP(p1, valid_raw_ipv6 + 54);
@ -2211,7 +2211,7 @@ end:
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2260,7 +2260,7 @@ static int SigTest30UDPV4Keyword(void)
"\r\n\r\nyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV4(p1, raw_ipv4);
PacketSetUDP(p1, valid_raw_udp);
@ -2311,7 +2311,7 @@ static int SigTest30UDPV4Keyword(void)
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2364,7 +2364,7 @@ static int SigTest31NegativeUDPV4Keyword(void)
"\r\n\r\nyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV4(p1, raw_ipv4);
PacketSetUDP(p1, valid_raw_udp);
@ -2430,7 +2430,7 @@ static int SigTest31NegativeUDPV4Keyword(void)
end:
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2473,7 +2473,7 @@ static int SigTest32UDPV6Keyword(void)
"\r\n\r\n";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetUDP(p1, valid_raw_ipv6 + 54);
@ -2524,7 +2524,7 @@ static int SigTest32UDPV6Keyword(void)
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2570,7 +2570,7 @@ static int SigTest33NegativeUDPV6Keyword(void)
"\r\n\r\n";
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
PacketSetIPV6(p1, valid_raw_ipv6 + 14);
PacketSetUDP(p1, valid_raw_ipv6 + 54);
@ -2635,7 +2635,7 @@ static int SigTest33NegativeUDPV6Keyword(void)
end:
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2684,7 +2684,7 @@ static int SigTest34ICMPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
IPV4Hdr *ip4h = PacketSetIPV4(p1, valid_raw_ipv4);
ip4h->ip_verhl = 69;
@ -2751,7 +2751,7 @@ static int SigTest34ICMPV4Keyword(void)
end:
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2800,7 +2800,7 @@ static int SigTest35NegativeICMPV4Keyword(void)
uint16_t buflen = strlen((char *)buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
IPV4Hdr *ip4h = PacketSetIPV4(p1, valid_raw_ipv4);
ip4h->ip_verhl = 69;
@ -2868,7 +2868,7 @@ static int SigTest35NegativeICMPV4Keyword(void)
end:
PacketFree(p1);
PacketFree(p2);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -2915,7 +2915,7 @@ static int SigTest38(void)
uint16_t buflen = sizeof(buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
/* Copy raw data into packet */
if (PacketCopyData(p1, raw_eth, ethlen) == -1) {
@ -2996,7 +2996,7 @@ cleanup:
end:
PacketFree(p1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3039,7 +3039,7 @@ static int SigTest39(void)
uint16_t buflen = sizeof(buf);
memset(&th_v, 0, sizeof(ThreadVars));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p1 = PacketGetFromAlloc();
FAIL_IF_NULL(p1);
@ -3089,7 +3089,7 @@ static int SigTest39(void)
DetectEngineCtxFree(de_ctx);
PacketFree(p1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -3142,7 +3142,7 @@ static int SigTest36ContentAndIsdataatKeywords01 (void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));
@ -3166,7 +3166,7 @@ static int SigTest36ContentAndIsdataatKeywords01 (void)
PacketFree(p);
FlowShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -3223,7 +3223,7 @@ static int SigTest37ContentAndIsdataatKeywords02 (void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, sizeof(raw_eth));
@ -3281,7 +3281,7 @@ end:
FlowShutdown();
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3307,7 +3307,7 @@ static int SigTest40NoPacketInspection01(void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
memset(&pq, 0, sizeof(pq));
memset(&f, 0, sizeof(f));
memset(&tcphdr, 0, sizeof(tcphdr));
@ -3355,7 +3355,7 @@ static int SigTest40NoPacketInspection01(void)
DetectEngineCtxFree(de_ctx);
end:
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3372,7 +3372,7 @@ static int SigTest40NoPayloadInspection02(void)
uint16_t buflen = strlen((char *)buf);
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = PacketGetFromAlloc();
FAIL_IF_NULL(p);
@ -3403,7 +3403,7 @@ static int SigTest40NoPayloadInspection02(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -3425,7 +3425,7 @@ static int SigTestMemory01 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p->src.family = AF_INET;
p->dst.family = AF_INET;
p->payload = buf;
@ -3454,7 +3454,7 @@ static int SigTestMemory01 (void)
result = 1;
end:
PacketFree(p);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3464,7 +3464,7 @@ static int SigTestMemory02 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
if (de_ctx == NULL) {
@ -3489,7 +3489,7 @@ static int SigTestMemory02 (void)
result = 1;
end:
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3499,7 +3499,7 @@ static int SigTestMemory03 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
if (de_ctx == NULL) {
@ -3529,7 +3529,7 @@ static int SigTestMemory03 (void)
result = 1;
end:
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3542,7 +3542,7 @@ static int SigTestContent01 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3572,7 +3572,7 @@ static int SigTestContent01 (void)
DetectEngineCtxFree(de_ctx);
end:
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3585,7 +3585,7 @@ static int SigTestContent02 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3624,7 +3624,7 @@ static int SigTestContent02 (void)
DetectEngineCtxFree(de_ctx);
end:
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3637,7 +3637,7 @@ static int SigTestContent03 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3667,7 +3667,7 @@ static int SigTestContent03 (void)
DetectEngineCtxFree(de_ctx);
end:
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3680,7 +3680,7 @@ static int SigTestContent04 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3711,7 +3711,7 @@ static int SigTestContent04 (void)
DetectEngineCtxFree(de_ctx);
end:
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3725,7 +3725,7 @@ static int SigTestContent05 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3772,7 +3772,7 @@ end:
if (de_ctx != NULL) {
DetectEngineCtxFree(de_ctx);
}
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3785,7 +3785,7 @@ static int SigTestContent06 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = NULL;
p = UTHBuildPacket((uint8_t *)buf, buflen, IPPROTO_TCP);
@ -3829,7 +3829,7 @@ static int SigTestContent06 (void)
DetectEngineCtxFree(de_ctx);
end:
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -3927,7 +3927,7 @@ static int SigTestWithin01 (void)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
@ -3990,7 +3990,7 @@ static int SigTestWithin01 (void)
DetectEngineCtxFree(de_ctx);
FlowShutdown();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -4004,7 +4004,7 @@ static int SigTestDepthOffset01 (void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
@ -4032,7 +4032,7 @@ static int SigTestDepthOffset01 (void)
DetectEngineCtxFree(de_ctx);
end:
UTHFreePackets(&p, 1);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -4042,7 +4042,7 @@ static int SigTestDetectAlertCounter(void)
ThreadVars tv;
DetectEngineThreadCtx *det_ctx = NULL;
memset(&tv, 0, sizeof(tv));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -4056,7 +4056,7 @@ static int SigTestDetectAlertCounter(void)
strlcpy(tv.name, "detect_test", sizeof(tv.name));
DetectEngineThreadCtxInit(&tv, de_ctx, (void *)&det_ctx);
/* init counters */
StatsSetupPrivate(&tv);
StatsSetupPrivate(&tv.stats, NULL);
p = UTHBuildPacket((uint8_t *)"boo", strlen("boo"), IPPROTO_TCP);
Detect(&tv, p, det_ctx);
@ -4078,7 +4078,7 @@ static int SigTestDetectAlertCounter(void)
DetectEngineThreadCtxDeinit(&tv, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -4100,7 +4100,7 @@ static int SigTestDropFlow01(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -4153,7 +4153,7 @@ static int SigTestDropFlow01(void)
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}
@ -4176,7 +4176,7 @@ static int SigTestDropFlow02(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -4254,7 +4254,7 @@ end:
FLOW_DESTROY(&f);
UTHFreePackets(&p, 1);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return result;
}
@ -4288,7 +4288,7 @@ static int SigTestDropFlow03(void)
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
memset(&f, 0, sizeof(Flow));
memset(&ssn, 0, sizeof(TcpSession));
@ -4424,7 +4424,7 @@ end:
/* Restore mode to IDS */
EngineModeSetIDS();
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return result;
}
@ -4440,7 +4440,7 @@ static int SigTestPorts01(void)
uint8_t payload[] = "AAAAAAAAAAAAAAAAAA";
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
p1 = UTHBuildPacket(payload, sizeof(payload), IPPROTO_ICMP);
@ -4475,7 +4475,7 @@ end:
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p1, 1);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
return result;
}
@ -4486,7 +4486,7 @@ static int SigTestBug01(void)
DetectEngineThreadCtx *det_ctx = NULL;
uint8_t payload[] = "!mymy";
memset(&tv, 0, sizeof(ThreadVars));
StatsThreadInit(&tv);
StatsThreadInit(&tv.stats);
Packet *p1 = UTHBuildPacket(payload, sizeof(payload), IPPROTO_TCP);
FAIL_IF_NULL(p1);
@ -4507,7 +4507,7 @@ static int SigTestBug01(void)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
DetectEngineCtxFree(de_ctx);
UTHFreePackets(&p1, 1);
StatsThreadCleanup(&tv);
StatsThreadCleanup(&tv.stats);
PASS;
}

@ -95,7 +95,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
dtv = DecodeThreadVarsAlloc(&tv);
DecodeRegisterPerfCounters(dtv, &tv);
tmm_modules[TMM_FLOWWORKER].ThreadInit(&tv, NULL, &fwd);
StatsSetupPrivate(&tv);
StatsSetupPrivate(&tv.stats, NULL);
extern uint32_t max_pending_packets;
max_pending_packets = 128;

@ -88,7 +88,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
dtv = DecodeThreadVarsAlloc(&tv);
DecodeRegisterPerfCounters(dtv, &tv);
tmm_modules[TMM_FLOWWORKER].ThreadInit(&tv, NULL, &fwd);
StatsSetupPrivate(&tv);
StatsSetupPrivate(&tv.stats, NULL);
extern uint32_t max_pending_packets;
max_pending_packets = 128;

@ -113,7 +113,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
dtv = DecodeThreadVarsAlloc(&tv);
DecodeRegisterPerfCounters(dtv, &tv);
tmm_modules[TMM_FLOWWORKER].ThreadInit(&tv, NULL, &fwd);
StatsSetupPrivate(&tv);
StatsSetupPrivate(&tv.stats, NULL);
extern uint32_t max_pending_packets;
max_pending_packets = 128;

@ -260,7 +260,7 @@ static bool TmThreadsSlotPktAcqLoopInit(ThreadVars *tv)
}
}
StatsSetupPrivate(tv);
StatsSetupPrivate(&tv->stats, tv->printable_name ? tv->printable_name : tv->name);
TmThreadsSetFlag(tv, THV_INIT_DONE);
@ -475,7 +475,7 @@ static void *TmThreadsSlotVar(void *td)
}
}
StatsSetupPrivate(tv);
StatsSetupPrivate(&tv->stats, tv->printable_name ? tv->printable_name : tv->name);
// Each 'worker' thread uses this func to process/decode the packet read.
// Each decode method is different to receive methods in that they do not
@ -564,7 +564,7 @@ static void *TmThreadsManagement(void *td)
(void)SC_ATOMIC_SET(s->slot_data, slot_data);
}
StatsSetupPrivate(tv);
StatsSetupPrivate(&tv->stats, tv->printable_name ? tv->printable_name : tv->name);
TmThreadsSetFlag(tv, THV_INIT_DONE);
@ -951,7 +951,7 @@ ThreadVars *TmThreadCreate(const char *name, const char *inq_name, const char *i
goto error;
SC_ATOMIC_INIT(tv->flags);
StatsThreadInit(tv);
StatsThreadInit(&tv->stats);
strlcpy(tv->name, name, sizeof(tv->name));
@ -1645,7 +1645,7 @@ static void TmThreadFree(ThreadVars *tv)
SCFree(tv->flow_queue);
}
StatsThreadCleanup(tv);
StatsThreadCleanup(&tv->stats);
TmThreadDeinitMC(tv);

@ -1152,7 +1152,8 @@ static TmEcode UnixManager(ThreadVars *th_v, void *thread_data)
/* set the thread name */
SCLogDebug("%s started...", th_v->name);
int r = StatsSetupPrivate(th_v);
int r = StatsSetupPrivate(
&th_v->stats, th_v->printable_name ? th_v->printable_name : th_v->name);
if (r != 0) {
SCLogError("stats setup failed with code %d", r);
return TM_ECODE_FAILED;

@ -2297,7 +2297,7 @@ static int SCACTileTest29(void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2335,7 +2335,7 @@ end:
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
}
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -1981,7 +1981,7 @@ static int SCACTest29(void)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
Packet *p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
FAIL_IF_NULL(p);
@ -2008,7 +2008,7 @@ static int SCACTest29(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
UTHFreePackets(&p, 1);
PASS;

@ -2227,7 +2227,7 @@ static int SCHSTest29(void)
int result = 0;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
p = UTHBuildPacket(buf, buflen, IPPROTO_TCP);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2270,7 +2270,7 @@ end:
DetectEngineCtxFree(de_ctx);
}
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

@ -1536,7 +1536,7 @@ static int SCThresholdConfTest09(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
ThresholdInit();
@ -1608,7 +1608,7 @@ static int SCThresholdConfTest09(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1634,7 +1634,7 @@ static int SCThresholdConfTest10(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1700,7 +1700,7 @@ static int SCThresholdConfTest10(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1719,7 +1719,7 @@ static int SCThresholdConfTest11(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1807,7 +1807,7 @@ static int SCThresholdConfTest11(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1826,7 +1826,7 @@ static int SCThresholdConfTest12(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
FAIL_IF_NULL(de_ctx);
@ -1914,7 +1914,7 @@ static int SCThresholdConfTest12(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -1985,7 +1985,7 @@ static int SCThresholdConfTest14(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
FAIL_IF_NOT_NULL(g_ut_threshold_fp);
g_ut_threshold_fp = SCThresholdConfGenerateValidDummyFD11();
@ -2010,7 +2010,7 @@ static int SCThresholdConfTest14(void)
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2030,7 +2030,7 @@ static int SCThresholdConfTest15(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2060,7 +2060,7 @@ static int SCThresholdConfTest15(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2080,7 +2080,7 @@ static int SCThresholdConfTest16(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2109,7 +2109,7 @@ static int SCThresholdConfTest16(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2129,7 +2129,7 @@ static int SCThresholdConfTest17(void)
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
@ -2159,7 +2159,7 @@ static int SCThresholdConfTest17(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2402,7 +2402,7 @@ static int SCThresholdConfTest22(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
ThresholdInit();
@ -2508,7 +2508,7 @@ static int SCThresholdConfTest22(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
@ -2541,7 +2541,7 @@ static int SCThresholdConfTest23(void)
{
ThreadVars th_v;
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
ThresholdInit();
@ -2591,7 +2591,7 @@ static int SCThresholdConfTest23(void)
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
ThresholdDestroy();
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
PASS;
}
#endif /* UNITTESTS */

@ -698,7 +698,7 @@ int UTHMatchPacketsWithResults(DetectEngineCtx *de_ctx, Packet **p, int num_pack
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
@ -711,7 +711,7 @@ int UTHMatchPacketsWithResults(DetectEngineCtx *de_ctx, Packet **p, int num_pack
result = 1;
cleanup:
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -737,7 +737,7 @@ int UTHMatchPackets(DetectEngineCtx *de_ctx, Packet **p, int num_packets)
DetectEngineThreadCtx *det_ctx = NULL;
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
SCSigRegisterSignatureOrderingFuncs(de_ctx);
SCSigOrderSignatures(de_ctx);
SCSigSignatureOrderingModuleCleanup(de_ctx);
@ -752,7 +752,7 @@ int UTHMatchPackets(DetectEngineCtx *de_ctx, Packet **p, int num_packets)
* and others may not. That check will be outside
*/
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}
@ -778,7 +778,7 @@ int UTHPacketMatchSigMpm(Packet *p, char *sig, uint16_t mpm_type)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
if (mpm_type == MPM_AC) {
SCConfSet("mpm-algo", "ac");
@ -816,7 +816,7 @@ int UTHPacketMatchSigMpm(Packet *p, char *sig, uint16_t mpm_type)
end:
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
SCConfSet("mpm-algo", "auto");
SCReturnInt(result);
}
@ -841,7 +841,7 @@ int UTHPacketMatchSig(Packet *p, const char *sig)
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
StatsThreadInit(&th_v);
StatsThreadInit(&th_v.stats);
DetectEngineCtx *de_ctx = DetectEngineCtxInit();
if (de_ctx == NULL) {
@ -871,7 +871,7 @@ end:
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StatsThreadCleanup(&th_v);
StatsThreadCleanup(&th_v.stats);
return result;
}

Loading…
Cancel
Save