From: Victor Julien Date: Thu, 9 Jan 2014 11:13:03 +0000 (+0100) Subject: app-layer: rename AppLayerThreadCtx funcs X-Git-Tag: suricata-2.0rc1~247 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fdefb65be47facc21036ad2f348c519e110a4f60;p=thirdparty%2Fsuricata.git app-layer: rename AppLayerThreadCtx funcs AppLayerParserGetCtxThread -> AppLayerParserThreadCtxAlloc AppLayerParserDestroyCtxThread -> AppLayerParserThreadCtxFree --- diff --git a/src/app-layer-dcerpc-udp.c b/src/app-layer-dcerpc-udp.c index 67d3b9905f..f8c6bd10d8 100644 --- a/src/app-layer-dcerpc-udp.c +++ b/src/app-layer-dcerpc-udp.c @@ -1040,7 +1040,7 @@ int DCERPCUDPParserTest01(void) { TcpSession ssn; DCERPCUuidEntry *uuid_entry; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1092,7 +1092,7 @@ int DCERPCUDPParserTest01(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } diff --git a/src/app-layer-dcerpc.c b/src/app-layer-dcerpc.c index c584bfbdc8..dcacf7ed90 100644 --- a/src/app-layer-dcerpc.c +++ b/src/app-layer-dcerpc.c @@ -2395,7 +2395,7 @@ int DCERPCParserTest01(void) { uint32_t bindacklen = sizeof(dcerpcbindack); TcpSession ssn; DCERPCUuidEntry *uuid_entry; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2482,7 +2482,7 @@ int DCERPCParserTest01(void) { } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2626,7 +2626,7 @@ int DCERPCParserTest02(void) { uint32_t requestlen = sizeof(dcerpcrequest); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2681,7 +2681,7 @@ int DCERPCParserTest02(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2825,7 +2825,7 @@ int DCERPCParserTest03(void) { uint32_t requestlen = sizeof(dcerpcrequest); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2873,7 +2873,7 @@ int DCERPCParserTest03(void) { } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4005,7 +4005,7 @@ int DCERPCParserTest04(void) { uint32_t request9_len = sizeof(request9); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4231,7 +4231,7 @@ int DCERPCParserTest04(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; #endif @@ -4272,7 +4272,7 @@ int DCERPCParserTest05(void) { uint32_t bind2_len = sizeof(bind2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4333,7 +4333,7 @@ int DCERPCParserTest05(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4446,7 +4446,7 @@ int DCERPCParserTest06(void) { uint32_t bind2_len = sizeof(bind2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4498,7 +4498,7 @@ int DCERPCParserTest06(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4531,7 +4531,7 @@ int DCERPCParserTest07(void) { uint32_t request3_len = sizeof(request3); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4599,7 +4599,7 @@ int DCERPCParserTest07(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4622,7 +4622,7 @@ int DCERPCParserTest08(void) { uint32_t request_len = sizeof(request); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4658,7 +4658,7 @@ int DCERPCParserTest08(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4681,7 +4681,7 @@ int DCERPCParserTest09(void) { uint32_t request_len = sizeof(request); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4717,7 +4717,7 @@ int DCERPCParserTest09(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4754,7 +4754,7 @@ int DCERPCParserTest10(void) { uint32_t request2_len = sizeof(request2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4816,7 +4816,7 @@ int DCERPCParserTest10(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4854,7 +4854,7 @@ int DCERPCParserTest11(void) { uint32_t request3_len = sizeof(request3); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4920,7 +4920,7 @@ int DCERPCParserTest11(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -4952,7 +4952,7 @@ int DCERPCParserTest12(void) { uint32_t bind_ack2_len = sizeof(bind_ack2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -5000,7 +5000,7 @@ int DCERPCParserTest12(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -5029,7 +5029,7 @@ int DCERPCParserTest13(void) { uint32_t bind_len = sizeof(bind); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -5085,7 +5085,7 @@ int DCERPCParserTest13(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -5119,7 +5119,7 @@ int DCERPCParserTest14(void) { uint32_t bind_len = sizeof(bind); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -5150,7 +5150,7 @@ int DCERPCParserTest14(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -5180,7 +5180,7 @@ int DCERPCParserTest15(void) { uint32_t bind_ack_len = sizeof(bind_ack); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -5211,7 +5211,7 @@ int DCERPCParserTest15(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -5630,7 +5630,7 @@ int DCERPCParserTest16(void) { TcpSession ssn; DCERPCUuidEntry *item = NULL; int count = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); uint8_t accepted_uuids[3][16] = { {0x4b, 0x32, 0x4f, 0xc8, 0x16, 0x70, 0x01, 0xd3, @@ -5808,7 +5808,7 @@ int DCERPCParserTest16(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -5877,7 +5877,7 @@ int DCERPCParserTest17(void) { TcpSession ssn; DCERPCUuidEntry *item = NULL; int count = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); uint8_t accepted_uuids[2][16] = { {0x57, 0x67, 0x4c, 0xd0, 0x52, 0x00, 0x11, 0xce, @@ -6001,7 +6001,7 @@ int DCERPCParserTest17(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -6030,7 +6030,7 @@ int DCERPCParserTest18(void) { uint32_t request2_len = sizeof(request2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -6082,7 +6082,7 @@ int DCERPCParserTest18(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -6296,7 +6296,7 @@ int DCERPCParserTest19(void) uint32_t bindlen = sizeof(dcerpcbind); uint32_t bindacklen = sizeof(dcerpcbindack); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -6339,7 +6339,7 @@ int DCERPCParserTest19(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index d98e1b9fd9..bec86d6232 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -3137,7 +3137,7 @@ static int AppLayerProtoDetectTest16(void) ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; DetectEngineCtx *de_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&ssn, 0, sizeof(TcpSession)); @@ -3207,7 +3207,7 @@ static int AppLayerProtoDetectTest16(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3239,7 +3239,7 @@ static int AppLayerProtoDetectTest17(void) ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; DetectEngineCtx *de_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&ssn, 0, sizeof(TcpSession)); @@ -3303,7 +3303,7 @@ static int AppLayerProtoDetectTest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3335,7 +3335,7 @@ static int AppLayerProtoDetectTest18(void) ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; DetectEngineCtx *de_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&ssn, 0, sizeof(TcpSession)); @@ -3398,7 +3398,7 @@ static int AppLayerProtoDetectTest18(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3427,7 +3427,7 @@ static int AppLayerProtoDetectTest19(void) ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; DetectEngineCtx *de_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&ssn, 0, sizeof(TcpSession)); @@ -3485,7 +3485,7 @@ static int AppLayerProtoDetectTest19(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3515,7 +3515,7 @@ static int AppLayerProtoDetectTest20(void) ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; DetectEngineCtx *de_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&ssn, 0, sizeof(TcpSession)); @@ -3588,7 +3588,7 @@ static int AppLayerProtoDetectTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) diff --git a/src/app-layer-ftp.c b/src/app-layer-ftp.c index eeca2a1d3d..5dd014b37b 100644 --- a/src/app-layer-ftp.c +++ b/src/app-layer-ftp.c @@ -365,7 +365,7 @@ int FTPParserTest01(void) { uint8_t ftpbuf[] = "PORT 192,168,1,1,0,80\r\n"; uint32_t ftplen = sizeof(ftpbuf) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -401,7 +401,7 @@ int FTPParserTest01(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -418,7 +418,7 @@ int FTPParserTest03(void) { uint8_t ftpbuf3[] = "1,1,10,20\r\n"; uint32_t ftplen3 = sizeof(ftpbuf3) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -472,7 +472,7 @@ int FTPParserTest03(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -484,7 +484,7 @@ int FTPParserTest06(void) { uint8_t ftpbuf1[] = "PORT"; uint32_t ftplen1 = sizeof(ftpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -520,7 +520,7 @@ int FTPParserTest06(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -535,7 +535,7 @@ int FTPParserTest07(void) { uint8_t ftpbuf2[] = "RT\r\n"; uint32_t ftplen2 = sizeof(ftpbuf2) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -582,7 +582,7 @@ int FTPParserTest07(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -596,7 +596,7 @@ int FTPParserTest10(void) { uint8_t ftpbuf1[] = "PORT 1,2,3,4,5,6\r\n"; uint32_t ftplen1 = sizeof(ftpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int r = 0; memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -641,7 +641,7 @@ int FTPParserTest10(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; diff --git a/src/app-layer-htp-file.c b/src/app-layer-htp-file.c index c72197c313..0d0daceec0 100644 --- a/src/app-layer-htp-file.c +++ b/src/app-layer-htp-file.c @@ -311,7 +311,7 @@ static int HTPFileParserTest01(void) { uint32_t httplen2 = sizeof(httpbuf2) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *http_state = NULL; memset(&ssn, 0, sizeof(ssn)); @@ -366,7 +366,7 @@ static int HTPFileParserTest01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -402,7 +402,7 @@ static int HTPFileParserTest02(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -484,7 +484,7 @@ static int HTPFileParserTest02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -525,7 +525,7 @@ static int HTPFileParserTest03(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -634,7 +634,7 @@ static int HTPFileParserTest03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -675,7 +675,7 @@ static int HTPFileParserTest04(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -779,7 +779,7 @@ static int HTPFileParserTest04(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -811,7 +811,7 @@ static int HTPFileParserTest05(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -902,7 +902,7 @@ static int HTPFileParserTest05(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -935,7 +935,7 @@ static int HTPFileParserTest06(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -1026,7 +1026,7 @@ static int HTPFileParserTest06(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -1048,7 +1048,7 @@ static int HTPFileParserTest07(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -1122,7 +1122,7 @@ static int HTPFileParserTest07(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -1148,7 +1148,7 @@ static int HTPFileParserTest08(void) { uint32_t httplen2 = sizeof(httpbuf2) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *http_state = NULL; memset(&ssn, 0, sizeof(ssn)); @@ -1206,7 +1206,7 @@ static int HTPFileParserTest08(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -1243,7 +1243,7 @@ static int HTPFileParserTest09(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -1323,7 +1323,7 @@ static int HTPFileParserTest09(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -1358,7 +1358,7 @@ static int HTPFileParserTest10(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -1433,7 +1433,7 @@ static int HTPFileParserTest10(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -1496,7 +1496,7 @@ static int HTPFileParserTest11(void) { TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -1596,7 +1596,7 @@ static int HTPFileParserTest11(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index cfd063a530..b055efbb64 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -2753,7 +2753,7 @@ int HTPParserTest01(void) { TcpSession ssn; HtpState *htp_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -2812,7 +2812,7 @@ int HTPParserTest01(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -2828,7 +2828,7 @@ int HTPParserTest02(void) { uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -2869,7 +2869,7 @@ int HTPParserTest02(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -2888,7 +2888,7 @@ int HTPParserTest03(void) { HtpState *htp_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -2941,7 +2941,7 @@ int HTPParserTest03(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -2959,7 +2959,7 @@ int HTPParserTest04(void) { uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3001,7 +3001,7 @@ int HTPParserTest04(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -3029,7 +3029,7 @@ int HTPParserTest05(void) { uint8_t httpbuf6[] = "esults are tha bomb!"; uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3124,7 +3124,7 @@ int HTPParserTest05(void) { } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -3181,7 +3181,7 @@ int HTPParserTest06(void) { uint32_t httplen2 = sizeof(httpbuf2) - 1; /* minus the \0 */ TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3244,7 +3244,7 @@ int HTPParserTest06(void) { } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (http_state != NULL) HTPStateFree(http_state); @@ -3262,7 +3262,7 @@ int HTPParserTest07(void) { TcpSession ssn; HtpState *htp_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3332,7 +3332,7 @@ int HTPParserTest07(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -3350,7 +3350,7 @@ int HTPParserTest08(void) { uint8_t httpbuf1[] = "GET /secondhouse/image/js/\%ce\%de\%ce\%fd_RentCity.js?v=2011.05.02 HTTP/1.0\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); char input[] = "\ %YAML 1.1\n\ @@ -3414,7 +3414,7 @@ libhtp:\n\ result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -3435,7 +3435,7 @@ int HTPParserTest09(void) { uint8_t httpbuf1[] = "GET /secondhouse/image/js/\%ce\%de\%ce\%fd_RentCity.js?v=2011.05.02 HTTP/1.0\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); char input[] = "\ %YAML 1.1\n\ @@ -3500,7 +3500,7 @@ libhtp:\n\ result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -3523,7 +3523,7 @@ int HTPParserTest10(void) { TcpSession ssn; HtpState *htp_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3596,7 +3596,7 @@ int HTPParserTest10(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -3614,7 +3614,7 @@ static int HTPParserTest11(void) { TcpSession ssn; HtpState *htp_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3680,7 +3680,7 @@ static int HTPParserTest11(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -3698,7 +3698,7 @@ static int HTPParserTest12(void) { TcpSession ssn; HtpState *htp_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3767,7 +3767,7 @@ static int HTPParserTest12(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -3785,7 +3785,7 @@ int HTPParserTest13(void) { TcpSession ssn; HtpState *htp_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -3860,7 +3860,7 @@ int HTPParserTest13(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -4155,7 +4155,7 @@ int HTPParserConfigTest03(void) " Data is c0oL!"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -4267,7 +4267,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -4370,7 +4370,7 @@ static int HTPParserDecodingTest01(void) "GET /abc/def?ghi%252fjkl HTTP/1.1\r\nHost: www.domain.ltd\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -4510,7 +4510,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -4539,7 +4539,7 @@ static int HTPParserDecodingTest02(void) "GET /abc/def?ghi%252fjkl HTTP/1.1\r\nHost: www.domain.ltd\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -4681,7 +4681,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -4708,7 +4708,7 @@ static int HTPParserDecodingTest03(void) "GET /abc/def?ghi%252fjkl HTTP/1.1\r\nHost: www.domain.ltd\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -4824,7 +4824,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -4847,7 +4847,7 @@ static int HTPParserDecodingTest04(void) "GET /abc/def?a=http://www.abc.com/ HTTP/1.1\r\nHost: www.domain.ltd\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -4936,7 +4936,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -4959,7 +4959,7 @@ static int HTPParserDecodingTest05(void) "GET /index?id=\\\" HTTP/1.1\r\nHost: www.domain.ltd\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -5048,7 +5048,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -5071,7 +5071,7 @@ static int HTPParserDecodingTest06(void) "GET /put.php?ip=1.2.3.4&port=+6000 HTTP/1.1\r\nHost: www.domain.ltd\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -5160,7 +5160,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -5183,7 +5183,7 @@ static int HTPParserDecodingTest07(void) "GET /put.php?ip=1.2.3.4&port=+6000 HTTP/1.1\r\nHost: www.domain.ltd\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -5273,7 +5273,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -5296,7 +5296,7 @@ static int HTPParserDecodingTest08(void) "GET http://suricata-ids.org/blah/ HTTP/1.1\r\nHost: suricata-ids.org\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -5383,7 +5383,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -5406,7 +5406,7 @@ static int HTPParserDecodingTest09(void) "GET http://suricata-ids.org/blah/ HTTP/1.1\r\nHost: suricata-ids.org\r\n\r\n"; uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); HtpState *htp_state = NULL; int r = 0; @@ -5494,7 +5494,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -5588,7 +5588,7 @@ libhtp:\n\ TcpSession ssn; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -5639,7 +5639,7 @@ libhtp:\n\ result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); ConfDeInit(); ConfRestoreContextBackup(); @@ -5672,7 +5672,7 @@ libhtp:\n\ request-body-limit: 0\n\ response-body-limit: 0\n\ "; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -5778,7 +5778,7 @@ libhtp:\n\ result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -5815,7 +5815,7 @@ libhtp:\n\ response-body-limit: 0\n\ meta-field-limit: 20000\n\ "; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -5902,7 +5902,7 @@ libhtp:\n\ result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index eb66ea4a25..8234383fda 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -210,7 +210,7 @@ int AppLayerParserDeSetup(void) SCReturnInt(0); } -void *AppLayerParserGetCtxThread(void) +void *AppLayerParserThreadCtxAlloc(void) { SCEnter(); @@ -234,7 +234,7 @@ void *AppLayerParserGetCtxThread(void) SCReturnPtr(tctx, "void *"); } -void AppLayerParserDestroyCtxThread(void *alpd_tctx) +void AppLayerParserThreadCtxFree(void *alpd_tctx) { SCEnter(); @@ -1085,7 +1085,7 @@ static int AppLayerParserTest01(void) uint8_t testbuf[] = { 0x11 }; uint32_t testlen = sizeof(testbuf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&ssn, 0, sizeof(ssn)); @@ -1140,7 +1140,7 @@ static int AppLayerParserTest02(void) Flow *f = NULL; uint8_t testbuf[] = { 0x11 }; uint32_t testlen = sizeof(testbuf); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); /* Register the Test protocol state and parser functions */ AppLayerParserRegisterParser(IPPROTO_UDP, ALPROTO_TEST, STREAM_TOSERVER, diff --git a/src/app-layer-parser.h b/src/app-layer-parser.h index 4527af3375..12757b89de 100644 --- a/src/app-layer-parser.h +++ b/src/app-layer-parser.h @@ -42,15 +42,15 @@ int AppLayerParserDeSetup(void); * \retval Non-NULL pointer on success. * NULL pointer on failure. */ -void *AppLayerParserGetCtxThread(void); +void *AppLayerParserThreadCtxAlloc(void); /** * \brief Destroys the app layer parser thread context obtained - * using AppLayerParserGetCtxThread(). + * using AppLayerParserThreadCtxAlloc(). * * \param tctx Pointer to the thread context to be destroyed. */ -void AppLayerParserDestroyCtxThread(void *tctx); +void AppLayerParserThreadCtxFree(void *tctx); /** * \brief Given a protocol name, checks if the parser is enabled in diff --git a/src/app-layer-smb.c b/src/app-layer-smb.c index 039920597c..aa0ef9c426 100644 --- a/src/app-layer-smb.c +++ b/src/app-layer-smb.c @@ -1591,7 +1591,7 @@ int SMBParserTest01(void) { uint32_t smblen = sizeof(smbbuf) - 1; TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1633,7 +1633,7 @@ int SMBParserTest01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1667,7 +1667,7 @@ int SMBParserTest02(void) { uint32_t smblen = sizeof(smbbuf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1710,7 +1710,7 @@ int SMBParserTest02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1962,7 +1962,7 @@ int SMBParserTest03(void) { uint32_t smblen2 = sizeof(smbbuf2); uint32_t smblen3 = sizeof(smbbuf3); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int r = 0; memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2011,7 +2011,7 @@ int SMBParserTest03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2078,7 +2078,7 @@ int SMBParserTest04(void) { uint32_t smblen3 = sizeof(smbbuf3); uint32_t smblen4 = sizeof(smbbuf4); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int r = 0; memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2135,7 +2135,7 @@ int SMBParserTest04(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2332,7 +2332,7 @@ int SMBParserTest07(void) { }; uint32_t smblen1 = sizeof(smbbuf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int r = 0; memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2375,7 +2375,7 @@ int SMBParserTest07(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2405,7 +2405,7 @@ int SMBParserTest08(void) { uint32_t smblen1 = sizeof(smbbuf1); uint32_t smblen2 = sizeof(smbbuf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int r = 0; memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2474,7 +2474,7 @@ int SMBParserTest08(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2518,7 +2518,7 @@ int SMBParserTest09(void) { uint32_t smblen1 = sizeof(smbbuf1); uint32_t smblen2 = sizeof(smbbuf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int r = 0; memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2587,7 +2587,7 @@ int SMBParserTest09(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2640,7 +2640,7 @@ int SMBParserTest10(void) uint32_t smblen1 = sizeof(smbbuf1); uint32_t smblen2 = sizeof(smbbuf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int r = 0; memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2681,7 +2681,7 @@ int SMBParserTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } diff --git a/src/app-layer-smb2.c b/src/app-layer-smb2.c index 5ac6ab2ce0..02edd93e12 100644 --- a/src/app-layer-smb2.c +++ b/src/app-layer-smb2.c @@ -622,7 +622,7 @@ int SMB2ParserTest01(void) { uint32_t smb2len = sizeof(smb2buf) - 1; TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -667,7 +667,7 @@ int SMB2ParserTest01(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index cbc49ced8e..742e1cc004 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -1004,7 +1004,7 @@ int SMTPParserTest01(void) uint32_t reply2_len = sizeof(reply2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1118,7 +1118,7 @@ int SMTPParserTest01(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -1362,7 +1362,7 @@ int SMTPParserTest02(void) uint32_t reply10_len = sizeof(reply10); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1902,7 +1902,7 @@ int SMTPParserTest02(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -1996,7 +1996,7 @@ int SMTPParserTest03(void) uint32_t reply2_len = sizeof(reply2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2105,7 +2105,7 @@ int SMTPParserTest03(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2143,7 +2143,7 @@ int SMTPParserTest04(void) uint32_t request1_len = sizeof(request1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2197,7 +2197,7 @@ int SMTPParserTest04(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2290,7 +2290,7 @@ int SMTPParserTest05(void) uint32_t reply3_len = sizeof(reply3); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2438,7 +2438,7 @@ int SMTPParserTest05(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2586,7 +2586,7 @@ int SMTPParserTest06(void) uint32_t request6_len = sizeof(request6); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2787,7 +2787,7 @@ int SMTPParserTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2824,7 +2824,7 @@ int SMTPParserTest07(void) int32_t request2_len = sizeof(request2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2900,7 +2900,7 @@ int SMTPParserTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2937,7 +2937,7 @@ int SMTPParserTest08(void) int32_t request2_len = sizeof(request2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -3013,7 +3013,7 @@ int SMTPParserTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -3050,7 +3050,7 @@ int SMTPParserTest09(void) int32_t request2_len = sizeof(request2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -3126,7 +3126,7 @@ int SMTPParserTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -3163,7 +3163,7 @@ int SMTPParserTest10(void) int32_t request2_len = sizeof(request2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -3239,7 +3239,7 @@ int SMTPParserTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -3270,7 +3270,7 @@ int SMTPParserTest11(void) int32_t request2_len = sizeof(request2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -3327,7 +3327,7 @@ int SMTPParserTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -3360,7 +3360,7 @@ int SMTPParserTest12(void) }; uint32_t reply1_len = sizeof(reply1); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3447,7 +3447,7 @@ end: DetectEngineCtxFree(de_ctx); if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); UTHFreePackets(&p, 1); @@ -3499,7 +3499,7 @@ int SMTPParserTest13(void) }; uint32_t request2_len = sizeof(request2); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3605,7 +3605,7 @@ end: DetectEngineCtxFree(de_ctx); if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); UTHFreePackets(&p, 1); diff --git a/src/app-layer-ssl.c b/src/app-layer-ssl.c index 0196fb4349..28fa76635e 100644 --- a/src/app-layer-ssl.c +++ b/src/app-layer-ssl.c @@ -1239,7 +1239,7 @@ static int SSLParserTest01(void) uint8_t tlsbuf[] = { 0x16, 0x03, 0x01 }; uint32_t tlslen = sizeof(tlsbuf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1280,7 +1280,7 @@ static int SSLParserTest01(void) } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1295,7 +1295,7 @@ static int SSLParserTest02(void) uint8_t tlsbuf2[] = { 0x03, 0x01 }; uint32_t tlslen2 = sizeof(tlsbuf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1346,7 +1346,7 @@ static int SSLParserTest02(void) } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1363,7 +1363,7 @@ static int SSLParserTest03(void) uint8_t tlsbuf3[] = { 0x01 }; uint32_t tlslen3 = sizeof(tlsbuf3); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1424,7 +1424,7 @@ static int SSLParserTest03(void) } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1443,7 +1443,7 @@ static int SSLParserTest04(void) uint8_t tlsbuf4[] = { 0x01, 0x00, 0x00, 0xad, 0x03, 0x01 }; uint32_t tlslen4 = sizeof(tlsbuf4); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1514,7 +1514,7 @@ static int SSLParserTest04(void) } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1529,7 +1529,7 @@ static int SSLParserTest05(void) uint8_t tlsbuf[] = { 0x16, 0x03, 0x01, 0x00, 0x01 }; uint32_t tlslen = sizeof(tlsbuf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1621,7 +1621,7 @@ static int SSLParserTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1638,7 +1638,7 @@ static int SSLParserTest06(void) uint8_t tlsbuf[] = { 0x16, 0x03, 0x01, 0x00, 0x01 }; uint32_t tlslen = sizeof(tlsbuf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1746,7 +1746,7 @@ static int SSLParserTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1787,7 +1787,7 @@ static int SSLParserMultimsgTest01(void) }; uint32_t tlslen1 = sizeof(tlsbuf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1828,7 +1828,7 @@ static int SSLParserMultimsgTest01(void) } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1868,7 +1868,7 @@ static int SSLParserMultimsgTest02(void) }; uint32_t tlslen1 = sizeof(tlsbuf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1909,7 +1909,7 @@ static int SSLParserMultimsgTest02(void) } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1938,7 +1938,7 @@ static int SSLParserTest07(void) 0x00, 0x0a, 0x00, 0x02, 0x01, 0x00 }; uint32_t tlslen = sizeof(tlsbuf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -1980,7 +1980,7 @@ static int SSLParserTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -1995,7 +1995,7 @@ static int SSLParserTest08(void) uint8_t tlsbuf[] = { 0x16, 0x03, 0x00, 0x00, 0x01 }; uint32_t tlslen = sizeof(tlsbuf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2086,7 +2086,7 @@ static int SSLParserTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2124,7 +2124,7 @@ static int SSLParserTest09(void) }; uint32_t buf2_len = sizeof(buf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2176,7 +2176,7 @@ static int SSLParserTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2212,7 +2212,7 @@ static int SSLParserTest10(void) }; uint32_t buf2_len = sizeof(buf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2264,7 +2264,7 @@ static int SSLParserTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2299,7 +2299,7 @@ static int SSLParserTest11(void) }; uint32_t buf2_len = sizeof(buf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2351,7 +2351,7 @@ static int SSLParserTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2391,7 +2391,7 @@ static int SSLParserTest12(void) }; uint32_t buf3_len = sizeof(buf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2453,7 +2453,7 @@ static int SSLParserTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2498,7 +2498,7 @@ static int SSLParserTest13(void) }; uint32_t buf4_len = sizeof(buf4); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2570,7 +2570,7 @@ static int SSLParserTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2594,7 +2594,7 @@ static int SSLParserTest14(void) uint32_t buf2_len = sizeof(buf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2632,7 +2632,7 @@ static int SSLParserTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2651,7 +2651,7 @@ static int SSLParserTest15(void) uint32_t buf1_len = sizeof(buf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2672,7 +2672,7 @@ static int SSLParserTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2691,7 +2691,7 @@ static int SSLParserTest16(void) uint32_t buf1_len = sizeof(buf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2712,7 +2712,7 @@ static int SSLParserTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2731,7 +2731,7 @@ static int SSLParserTest17(void) uint32_t buf1_len = sizeof(buf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2752,7 +2752,7 @@ static int SSLParserTest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2777,7 +2777,7 @@ static int SSLParserTest18(void) uint32_t buf2_len = sizeof(buf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2815,7 +2815,7 @@ static int SSLParserTest18(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2835,7 +2835,7 @@ static int SSLParserTest19(void) uint32_t buf1_len = sizeof(buf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2863,7 +2863,7 @@ static int SSLParserTest19(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2883,7 +2883,7 @@ static int SSLParserTest20(void) uint32_t buf1_len = sizeof(buf1); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2904,7 +2904,7 @@ static int SSLParserTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -2923,7 +2923,7 @@ static int SSLParserTest21(void) uint32_t buf_len = sizeof(buf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -2965,7 +2965,7 @@ static int SSLParserTest21(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -2988,7 +2988,7 @@ static int SSLParserTest22(void) 0x2f, 0x34, 0x84, 0x20, 0xc5}; uint32_t buf_len = sizeof(buf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); //AppLayerDetectProtoThreadInit(); @@ -3034,7 +3034,7 @@ static int SSLParserTest22(void) } end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -3293,7 +3293,7 @@ static int SSLParserTest23(void) uint32_t toserver_app_data_buf_len = sizeof(toserver_app_data_buf); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); //AppLayerDetectProtoThreadInit(); @@ -3507,7 +3507,7 @@ static int SSLParserTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); return result; @@ -3544,7 +3544,7 @@ static int SSLParserTest24(void) }; uint32_t buf2_len = sizeof(buf2); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -3596,7 +3596,7 @@ static int SSLParserTest24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } @@ -3923,7 +3923,7 @@ static int SSLParserTest25(void) uint32_t client_key_exchange_cipher_enc_hs_len = sizeof(client_key_exchange_cipher_enc_hs); TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -4000,7 +4000,7 @@ static int SSLParserTest25(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); return result; } diff --git a/src/app-layer.c b/src/app-layer.c index f0f9a2071e..f563274312 100644 --- a/src/app-layer.c +++ b/src/app-layer.c @@ -49,7 +49,7 @@ typedef struct AppLayerThreadCtx_ { /* App layer protocol detection thread context, from AppLayerProtoDetectGetCtxThread(). */ void *alpd_tctx; - /* App layer parser thread context, from AppLayerParserGetCtxThread(). */ + /* App layer parser thread context, from AppLayerParserThreadCtxAlloc(). */ void *alp_tctx; #ifdef PROFILING @@ -554,7 +554,7 @@ void *AppLayerGetCtxThread(void) if ((app_tctx->alpd_tctx = AppLayerProtoDetectGetCtxThread()) == NULL) goto error; - if ((app_tctx->alp_tctx = AppLayerParserGetCtxThread()) == NULL) + if ((app_tctx->alp_tctx = AppLayerParserThreadCtxAlloc()) == NULL) goto error; goto done; @@ -576,7 +576,7 @@ void AppLayerDestroyCtxThread(void *tctx) if (app_tctx->alpd_tctx != NULL) AppLayerProtoDetectDestroyCtxThread(app_tctx->alpd_tctx); if (app_tctx->alp_tctx != NULL) - AppLayerParserDestroyCtxThread(app_tctx->alp_tctx); + AppLayerParserThreadCtxFree(app_tctx->alp_tctx); SCFree(app_tctx); SCReturn; diff --git a/src/detect-dce-iface.c b/src/detect-dce-iface.c index 14841f4275..341f7fd0fd 100644 --- a/src/detect-dce-iface.c +++ b/src/detect-dce-iface.c @@ -889,7 +889,7 @@ static int DetectDceIfaceTestParse12(void) uint32_t dcerpc_bindack_len = sizeof(dcerpc_bindack); uint32_t dcerpc_request_len = sizeof(dcerpc_request); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -992,7 +992,7 @@ static int DetectDceIfaceTestParse12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1135,7 +1135,7 @@ static int DetectDceIfaceTestParse13(void) uint32_t dcerpc_request3_len = sizeof(dcerpc_request3); uint32_t dcerpc_response3_len = sizeof(dcerpc_response3); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -1331,7 +1331,7 @@ static int DetectDceIfaceTestParse13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1396,7 +1396,7 @@ static int DetectDceIfaceTestParse14(void) uint32_t dcerpc_bindack_len = sizeof(dcerpc_bindack); uint32_t dcerpc_request_len = sizeof(dcerpc_request); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -1494,7 +1494,7 @@ static int DetectDceIfaceTestParse14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1599,7 +1599,7 @@ static int DetectDceIfaceTestParse15(void) }; uint32_t dcerpc_request2_len = sizeof(dcerpc_request2); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -1802,7 +1802,7 @@ static int DetectDceIfaceTestParse15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-dce-opnum.c b/src/detect-dce-opnum.c index cbf48735e9..a038086a8a 100644 --- a/src/detect-dce-opnum.c +++ b/src/detect-dce-opnum.c @@ -1139,7 +1139,7 @@ static int DetectDceOpnumTestParse08(void) uint32_t dcerpc_bindack_len = sizeof(dcerpc_bindack); uint32_t dcerpc_request_len = sizeof(dcerpc_request); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1227,7 +1227,7 @@ static int DetectDceOpnumTestParse08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1678,7 +1678,7 @@ static int DetectDceOpnumTestParse09(void) uint32_t dcerpc_request_len = sizeof(dcerpc_request); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1740,7 +1740,7 @@ static int DetectDceOpnumTestParse09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1885,7 +1885,7 @@ static int DetectDceOpnumTestParse10(void) uint32_t dcerpc_request3_len = sizeof(dcerpc_request3); uint32_t dcerpc_response3_len = sizeof(dcerpc_response3); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2180,7 +2180,7 @@ static int DetectDceOpnumTestParse11(void) uint32_t dcerpc_request3_len = sizeof(dcerpc_request3); uint32_t dcerpc_response3_len = sizeof(dcerpc_response3); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2458,7 +2458,7 @@ static int DetectDceOpnumTestParse12(void) uint32_t dcerpc_request2_len = sizeof(dcerpc_request2); uint32_t dcerpc_response2_len = sizeof(dcerpc_response2); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2745,7 +2745,7 @@ static int DetectDceOpnumTestParse13(void) uint32_t dcerpc_request2_len = sizeof(dcerpc_request2); uint32_t dcerpc_response2_len = sizeof(dcerpc_response2); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); diff --git a/src/detect-dce-stub-data.c b/src/detect-dce-stub-data.c index 82f4f4061c..02f3932750 100644 --- a/src/detect-dce-stub-data.c +++ b/src/detect-dce-stub-data.c @@ -584,7 +584,7 @@ static int DetectDceStubDataTestParse02(void) uint32_t dcerpc_bind_len = sizeof(dcerpc_bind); uint32_t dcerpc_bindack_len = sizeof(dcerpc_bindack); uint32_t dcerpc_request_len = sizeof(dcerpc_request); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -688,7 +688,7 @@ static int DetectDceStubDataTestParse02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1139,7 +1139,7 @@ static int DetectDceStubDataTestParse03(void) uint32_t dcerpc_request_len = sizeof(dcerpc_request); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1203,7 +1203,7 @@ static int DetectDceStubDataTestParse03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1340,7 +1340,7 @@ static int DetectDceStubDataTestParse04(void) uint32_t dcerpc_request3_len = sizeof(dcerpc_request3); uint32_t dcerpc_response3_len = sizeof(dcerpc_response3); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1531,7 +1531,7 @@ static int DetectDceStubDataTestParse04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1641,7 +1641,7 @@ static int DetectDceStubDataTestParse05(void) uint32_t dcerpc_request3_len = sizeof(dcerpc_request3); uint32_t dcerpc_response3_len = sizeof(dcerpc_response3); - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1815,7 +1815,7 @@ static int DetectDceStubDataTestParse05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-dns-query.c b/src/detect-dns-query.c index 540c47fad8..40bbac8f0b 100644 --- a/src/detect-dns-query.c +++ b/src/detect-dns-query.c @@ -147,7 +147,7 @@ static int DetectDnsQueryTest01(void) { Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -209,7 +209,7 @@ static int DetectDnsQueryTest01(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -260,7 +260,7 @@ static int DetectDnsQueryTest02(void) { Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -391,7 +391,7 @@ static int DetectDnsQueryTest02(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -423,7 +423,7 @@ static int DetectDnsQueryTest03(void) { ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -489,7 +489,7 @@ static int DetectDnsQueryTest03(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -520,7 +520,7 @@ static int DetectDnsQueryTest04(void) { ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -610,7 +610,7 @@ static int DetectDnsQueryTest04(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -668,7 +668,7 @@ static int DetectDnsQueryTest05(void) { ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -828,7 +828,7 @@ static int DetectDnsQueryTest05(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -860,7 +860,7 @@ static int DetectDnsQueryTest06(void) { Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -935,7 +935,7 @@ static int DetectDnsQueryTest06(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -987,7 +987,7 @@ static int DetectDnsQueryTest07(void) { Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1133,7 +1133,7 @@ static int DetectDnsQueryTest07(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-dcepayload.c b/src/detect-engine-dcepayload.c index 5a3a19ee62..46c1f0e401 100644 --- a/src/detect-engine-dcepayload.c +++ b/src/detect-engine-dcepayload.c @@ -1277,7 +1277,7 @@ int DcePayloadTest01(void) "content:\"|79 26 46 f7 bf a1|\"; distance:0; sid:8;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1807,7 +1807,7 @@ int DcePayloadTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -2145,7 +2145,7 @@ int DcePayloadTest02(void) "dce_stub_data; content:\"|2d 5e 63 2a 4c|\"; distance:0; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2259,7 +2259,7 @@ int DcePayloadTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -2597,7 +2597,7 @@ int DcePayloadTest03(void) "content:\"|2d 5e 63 2a 4c|\"; distance:0; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2710,7 +2710,7 @@ int DcePayloadTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -3048,7 +3048,7 @@ int DcePayloadTest04(void) "content:\"|2d 5e 63 2a 4c|\"; distance:0; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3161,7 +3161,7 @@ int DcePayloadTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -3498,7 +3498,7 @@ int DcePayloadTest05(void) "dce_stub_data; content:\"|2d 5e 63 2a 4c|\"; distance:0; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3611,7 +3611,7 @@ int DcePayloadTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -3949,7 +3949,7 @@ int DcePayloadTest06(void) "content:\"|2d 5e 63 2a 4c|\"; distance:0; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -4062,7 +4062,7 @@ int DcePayloadTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -4399,7 +4399,7 @@ int DcePayloadTest07(void) "content:\"|2d 5e 63 35 25|\"; distance:0; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -4512,7 +4512,7 @@ int DcePayloadTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -4687,7 +4687,7 @@ int DcePayloadTest08(void) "distance:0; within:2; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -4739,7 +4739,7 @@ int DcePayloadTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -4914,7 +4914,7 @@ int DcePayloadTest09(void) "distance:0; within:2; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -4966,7 +4966,7 @@ int DcePayloadTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -5141,7 +5141,7 @@ int DcePayloadTest10(void) "distance:-10; within:3; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -5193,7 +5193,7 @@ int DcePayloadTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -5503,7 +5503,7 @@ int DcePayloadTest11(void) "distance:1; within:3; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -5568,7 +5568,7 @@ int DcePayloadTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -5879,7 +5879,7 @@ int DcePayloadTest12(void) "distance:2; within:3; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -5944,7 +5944,7 @@ int DcePayloadTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -6069,7 +6069,7 @@ int DcePayloadTest13(void) "(dce_stub_data; content:\"|00 18|\"; sid:3;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -6218,7 +6218,7 @@ int DcePayloadTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -6320,7 +6320,7 @@ int DcePayloadTest14(void) "(dce_stub_data; content:\"|3f 00|\"; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -6444,7 +6444,7 @@ int DcePayloadTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -6501,7 +6501,7 @@ int DcePayloadTest15(void) "byte_test:2,=,46,5,relative,dce; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -6562,7 +6562,7 @@ int DcePayloadTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -6617,7 +6617,7 @@ int DcePayloadTest16(void) "byte_test:2,=,11776,5,relative; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -6678,7 +6678,7 @@ int DcePayloadTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -6733,7 +6733,7 @@ int DcePayloadTest17(void) "byte_test:2,=,46,5,relative,little; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -6794,7 +6794,7 @@ int DcePayloadTest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -6849,7 +6849,7 @@ int DcePayloadTest18(void) "byte_jump:2,2,relative,dce; byte_test:2,=,14080,0,relative; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -6910,7 +6910,7 @@ int DcePayloadTest18(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -6965,7 +6965,7 @@ int DcePayloadTest19(void) "byte_jump:2,2,relative; byte_test:2,=,14080,0,relative; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -7026,7 +7026,7 @@ int DcePayloadTest19(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -7081,7 +7081,7 @@ int DcePayloadTest20(void) "byte_jump:2,2,little,relative; byte_test:2,=,14080,0,relative; sid:2;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -7142,7 +7142,7 @@ int DcePayloadTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -7189,7 +7189,7 @@ int DcePayloadTest21(void) "content:\"string\"; within:8; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -7243,7 +7243,7 @@ int DcePayloadTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -7290,7 +7290,7 @@ int DcePayloadTest22(void) "content:\"string\"; within:8; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -7344,7 +7344,7 @@ int DcePayloadTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -7392,7 +7392,7 @@ int DcePayloadTest23(void) "content:\"string\"; within:8; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -7446,7 +7446,7 @@ int DcePayloadTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -9608,7 +9608,7 @@ int DcePayloadTest42(void) "content:!\"and\"; distance:0; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -9662,7 +9662,7 @@ int DcePayloadTest42(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -9710,7 +9710,7 @@ int DcePayloadTest43(void) "pcre:/super/R; content:\"nova\"; within:7; sid:1;)"; Signature *s; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -9764,7 +9764,7 @@ int DcePayloadTest43(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-engine-hcbd.c b/src/detect-engine-hcbd.c index 79d0fdf882..6cb955ecd5 100644 --- a/src/detect-engine-hcbd.c +++ b/src/detect-engine-hcbd.c @@ -316,7 +316,7 @@ static int DetectEngineHttpClientBodyTest01(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -405,7 +405,7 @@ static int DetectEngineHttpClientBodyTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -440,7 +440,7 @@ static int DetectEngineHttpClientBodyTest02(void) "This is dummy body1"; uint32_t http1_len = sizeof(http1_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -511,7 +511,7 @@ static int DetectEngineHttpClientBodyTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -549,7 +549,7 @@ static int DetectEngineHttpClientBodyTest03(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -638,7 +638,7 @@ static int DetectEngineHttpClientBodyTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -676,7 +676,7 @@ static int DetectEngineHttpClientBodyTest04(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -765,7 +765,7 @@ static int DetectEngineHttpClientBodyTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -802,7 +802,7 @@ static int DetectEngineHttpClientBodyTest05(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -891,7 +891,7 @@ static int DetectEngineHttpClientBodyTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -928,7 +928,7 @@ static int DetectEngineHttpClientBodyTest06(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1017,7 +1017,7 @@ static int DetectEngineHttpClientBodyTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1054,7 +1054,7 @@ static int DetectEngineHttpClientBodyTest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1140,7 +1140,7 @@ static int DetectEngineHttpClientBodyTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1177,7 +1177,7 @@ static int DetectEngineHttpClientBodyTest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1266,7 +1266,7 @@ static int DetectEngineHttpClientBodyTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1303,7 +1303,7 @@ static int DetectEngineHttpClientBodyTest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1393,7 +1393,7 @@ static int DetectEngineHttpClientBodyTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1430,7 +1430,7 @@ static int DetectEngineHttpClientBodyTest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1520,7 +1520,7 @@ static int DetectEngineHttpClientBodyTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1557,7 +1557,7 @@ static int DetectEngineHttpClientBodyTest11(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1647,7 +1647,7 @@ static int DetectEngineHttpClientBodyTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1684,7 +1684,7 @@ static int DetectEngineHttpClientBodyTest12(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1774,7 +1774,7 @@ static int DetectEngineHttpClientBodyTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1811,7 +1811,7 @@ static int DetectEngineHttpClientBodyTest13(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1901,7 +1901,7 @@ static int DetectEngineHttpClientBodyTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1938,7 +1938,7 @@ static int DetectEngineHttpClientBodyTest14(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2028,7 +2028,7 @@ static int DetectEngineHttpClientBodyTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2065,7 +2065,7 @@ static int DetectEngineHttpClientBodyTest15(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2155,7 +2155,7 @@ static int DetectEngineHttpClientBodyTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2192,7 +2192,7 @@ static int DetectEngineHttpClientBodyTest16(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2282,7 +2282,7 @@ static int DetectEngineHttpClientBodyTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2607,7 +2607,7 @@ static int DetectEngineHttpClientBodyTest21(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2697,7 +2697,7 @@ static int DetectEngineHttpClientBodyTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2734,7 +2734,7 @@ static int DetectEngineHttpClientBodyTest22(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2824,7 +2824,7 @@ static int DetectEngineHttpClientBodyTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2861,7 +2861,7 @@ static int DetectEngineHttpClientBodyTest23(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2951,7 +2951,7 @@ static int DetectEngineHttpClientBodyTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2988,7 +2988,7 @@ static int DetectEngineHttpClientBodyTest24(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3078,7 +3078,7 @@ static int DetectEngineHttpClientBodyTest24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3115,7 +3115,7 @@ static int DetectEngineHttpClientBodyTest25(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3205,7 +3205,7 @@ static int DetectEngineHttpClientBodyTest25(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3242,7 +3242,7 @@ static int DetectEngineHttpClientBodyTest26(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3332,7 +3332,7 @@ static int DetectEngineHttpClientBodyTest26(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3369,7 +3369,7 @@ static int DetectEngineHttpClientBodyTest27(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3459,7 +3459,7 @@ static int DetectEngineHttpClientBodyTest27(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3496,7 +3496,7 @@ static int DetectEngineHttpClientBodyTest28(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3586,7 +3586,7 @@ static int DetectEngineHttpClientBodyTest28(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3624,7 +3624,7 @@ static int DetectEngineHttpClientBodyTest29(void) strlen(request_buffer)); } uint32_t http_buf_len = TOTAL_REQUESTS * strlen(request_buffer); - alp_tctx = AppLayerParserGetCtxThread(); + alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3692,7 +3692,7 @@ static int DetectEngineHttpClientBodyTest29(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3751,7 +3751,7 @@ libhtp:\n\ uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3840,7 +3840,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HtpConfigRestoreBackup(); ConfRestoreContextBackup(); @@ -3903,7 +3903,7 @@ libhtp:\n\ uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3992,7 +3992,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HtpConfigRestoreBackup(); ConfRestoreContextBackup(); diff --git a/src/detect-engine-hcd.c b/src/detect-engine-hcd.c index be7f76ca9e..4f80d0ba42 100644 --- a/src/detect-engine-hcd.c +++ b/src/detect-engine-hcd.c @@ -174,7 +174,7 @@ static int DetectEngineHttpCookieTest01(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -239,7 +239,7 @@ static int DetectEngineHttpCookieTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -272,7 +272,7 @@ static int DetectEngineHttpCookieTest02(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -337,7 +337,7 @@ static int DetectEngineHttpCookieTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -370,7 +370,7 @@ static int DetectEngineHttpCookieTest03(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -435,7 +435,7 @@ static int DetectEngineHttpCookieTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -468,7 +468,7 @@ static int DetectEngineHttpCookieTest04(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -533,7 +533,7 @@ static int DetectEngineHttpCookieTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -566,7 +566,7 @@ static int DetectEngineHttpCookieTest05(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -631,7 +631,7 @@ static int DetectEngineHttpCookieTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -664,7 +664,7 @@ static int DetectEngineHttpCookieTest06(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -729,7 +729,7 @@ static int DetectEngineHttpCookieTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -762,7 +762,7 @@ static int DetectEngineHttpCookieTest07(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -827,7 +827,7 @@ static int DetectEngineHttpCookieTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -860,7 +860,7 @@ static int DetectEngineHttpCookieTest08(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -925,7 +925,7 @@ static int DetectEngineHttpCookieTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -958,7 +958,7 @@ static int DetectEngineHttpCookieTest09(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1023,7 +1023,7 @@ static int DetectEngineHttpCookieTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1056,7 +1056,7 @@ static int DetectEngineHttpCookieTest10(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1122,7 +1122,7 @@ static int DetectEngineHttpCookieTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1155,7 +1155,7 @@ static int DetectEngineHttpCookieTest11(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1221,7 +1221,7 @@ static int DetectEngineHttpCookieTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1254,7 +1254,7 @@ static int DetectEngineHttpCookieTest12(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1320,7 +1320,7 @@ static int DetectEngineHttpCookieTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1353,7 +1353,7 @@ static int DetectEngineHttpCookieTest13(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1419,7 +1419,7 @@ static int DetectEngineHttpCookieTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1452,7 +1452,7 @@ static int DetectEngineHttpCookieTest14(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1518,7 +1518,7 @@ static int DetectEngineHttpCookieTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1551,7 +1551,7 @@ static int DetectEngineHttpCookieTest15(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1617,7 +1617,7 @@ static int DetectEngineHttpCookieTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1650,7 +1650,7 @@ static int DetectEngineHttpCookieTest16(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1716,7 +1716,7 @@ static int DetectEngineHttpCookieTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1749,7 +1749,7 @@ static int DetectEngineHttpCookieTest17(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1815,7 +1815,7 @@ static int DetectEngineHttpCookieTest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hhd.c b/src/detect-engine-hhd.c index 6b7d79e418..382ba5e9fe 100644 --- a/src/detect-engine-hhd.c +++ b/src/detect-engine-hhd.c @@ -299,7 +299,7 @@ static int DetectEngineHttpHeaderTest01(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -363,7 +363,7 @@ static int DetectEngineHttpHeaderTest01(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -395,7 +395,7 @@ static int DetectEngineHttpHeaderTest02(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -459,7 +459,7 @@ static int DetectEngineHttpHeaderTest02(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -491,7 +491,7 @@ static int DetectEngineHttpHeaderTest03(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -555,7 +555,7 @@ static int DetectEngineHttpHeaderTest03(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -587,7 +587,7 @@ static int DetectEngineHttpHeaderTest04(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -651,7 +651,7 @@ static int DetectEngineHttpHeaderTest04(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -683,7 +683,7 @@ static int DetectEngineHttpHeaderTest05(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -747,7 +747,7 @@ static int DetectEngineHttpHeaderTest05(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -779,7 +779,7 @@ static int DetectEngineHttpHeaderTest06(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -843,7 +843,7 @@ static int DetectEngineHttpHeaderTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -875,7 +875,7 @@ static int DetectEngineHttpHeaderTest07(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -939,7 +939,7 @@ static int DetectEngineHttpHeaderTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -971,7 +971,7 @@ static int DetectEngineHttpHeaderTest08(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1035,7 +1035,7 @@ static int DetectEngineHttpHeaderTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1067,7 +1067,7 @@ static int DetectEngineHttpHeaderTest09(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1131,7 +1131,7 @@ static int DetectEngineHttpHeaderTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1163,7 +1163,7 @@ static int DetectEngineHttpHeaderTest10(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1227,7 +1227,7 @@ static int DetectEngineHttpHeaderTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1259,7 +1259,7 @@ static int DetectEngineHttpHeaderTest11(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1323,7 +1323,7 @@ static int DetectEngineHttpHeaderTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1355,7 +1355,7 @@ static int DetectEngineHttpHeaderTest12(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1419,7 +1419,7 @@ static int DetectEngineHttpHeaderTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1451,7 +1451,7 @@ static int DetectEngineHttpHeaderTest13(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1515,7 +1515,7 @@ static int DetectEngineHttpHeaderTest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1547,7 +1547,7 @@ static int DetectEngineHttpHeaderTest14(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1611,7 +1611,7 @@ static int DetectEngineHttpHeaderTest14(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1643,7 +1643,7 @@ static int DetectEngineHttpHeaderTest15(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1707,7 +1707,7 @@ static int DetectEngineHttpHeaderTest15(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1739,7 +1739,7 @@ static int DetectEngineHttpHeaderTest16(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1803,7 +1803,7 @@ static int DetectEngineHttpHeaderTest16(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1835,7 +1835,7 @@ static int DetectEngineHttpHeaderTest17(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1899,7 +1899,7 @@ static int DetectEngineHttpHeaderTest17(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2082,7 +2082,7 @@ static int DetectEngineHttpHeaderTest20(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2172,7 +2172,7 @@ static int DetectEngineHttpHeaderTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2206,7 +2206,7 @@ static int DetectEngineHttpHeaderTest21(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2296,7 +2296,7 @@ static int DetectEngineHttpHeaderTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2330,7 +2330,7 @@ static int DetectEngineHttpHeaderTest22(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2420,7 +2420,7 @@ static int DetectEngineHttpHeaderTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2454,7 +2454,7 @@ static int DetectEngineHttpHeaderTest23(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2544,7 +2544,7 @@ static int DetectEngineHttpHeaderTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2578,7 +2578,7 @@ static int DetectEngineHttpHeaderTest24(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2668,7 +2668,7 @@ static int DetectEngineHttpHeaderTest24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2702,7 +2702,7 @@ static int DetectEngineHttpHeaderTest25(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2792,7 +2792,7 @@ static int DetectEngineHttpHeaderTest25(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2826,7 +2826,7 @@ static int DetectEngineHttpHeaderTest26(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2916,7 +2916,7 @@ static int DetectEngineHttpHeaderTest26(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2950,7 +2950,7 @@ static int DetectEngineHttpHeaderTest27(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3040,7 +3040,7 @@ static int DetectEngineHttpHeaderTest27(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3079,7 +3079,7 @@ static int DetectEngineHttpHeaderTest28(void) "abcdef"; uint32_t http_buf2_len = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3169,7 +3169,7 @@ static int DetectEngineHttpHeaderTest28(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3208,7 +3208,7 @@ static int DetectEngineHttpHeaderTest29(void) "abcdef"; uint32_t http_buf2_len = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3298,7 +3298,7 @@ static int DetectEngineHttpHeaderTest29(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3370,7 +3370,7 @@ static int DetectEngineHttpHeaderTest30(void) "abcdef"; uint32_t http_buf2_len = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3460,7 +3460,7 @@ static int DetectEngineHttpHeaderTest30(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3495,7 +3495,7 @@ static int DetectEngineHttpHeaderTest31(void) "SixZix: blah\r\n\r\n"; uint32_t http1_len = sizeof(http1_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3563,7 +3563,7 @@ static int DetectEngineHttpHeaderTest31(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3601,7 +3601,7 @@ static int DetectEngineHttpHeaderTest32(void) "\r\n"; uint32_t http1_len = sizeof(http1_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3666,7 +3666,7 @@ static int DetectEngineHttpHeaderTest32(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3707,7 +3707,7 @@ static int DetectEngineHttpHeaderTest33(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3795,7 +3795,7 @@ static int DetectEngineHttpHeaderTest33(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hhhd.c b/src/detect-engine-hhhd.c index 57c22a84ad..190b6f987e 100644 --- a/src/detect-engine-hhhd.c +++ b/src/detect-engine-hhhd.c @@ -147,7 +147,7 @@ static int DetectEngineHttpHHTest01(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -212,7 +212,7 @@ static int DetectEngineHttpHHTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -245,7 +245,7 @@ static int DetectEngineHttpHHTest02(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -310,7 +310,7 @@ static int DetectEngineHttpHHTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -343,7 +343,7 @@ static int DetectEngineHttpHHTest03(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -408,7 +408,7 @@ static int DetectEngineHttpHHTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -441,7 +441,7 @@ static int DetectEngineHttpHHTest04(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -506,7 +506,7 @@ static int DetectEngineHttpHHTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -539,7 +539,7 @@ static int DetectEngineHttpHHTest05(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -604,7 +604,7 @@ static int DetectEngineHttpHHTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -637,7 +637,7 @@ static int DetectEngineHttpHHTest06(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -702,7 +702,7 @@ static int DetectEngineHttpHHTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -735,7 +735,7 @@ static int DetectEngineHttpHHTest07(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -800,7 +800,7 @@ static int DetectEngineHttpHHTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -833,7 +833,7 @@ static int DetectEngineHttpHHTest08(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -898,7 +898,7 @@ static int DetectEngineHttpHHTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -931,7 +931,7 @@ static int DetectEngineHttpHHTest09(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -996,7 +996,7 @@ static int DetectEngineHttpHHTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1029,7 +1029,7 @@ static int DetectEngineHttpHHTest10(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1095,7 +1095,7 @@ static int DetectEngineHttpHHTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1128,7 +1128,7 @@ static int DetectEngineHttpHHTest11(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1194,7 +1194,7 @@ static int DetectEngineHttpHHTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1227,7 +1227,7 @@ static int DetectEngineHttpHHTest12(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1293,7 +1293,7 @@ static int DetectEngineHttpHHTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1326,7 +1326,7 @@ static int DetectEngineHttpHHTest13(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1392,7 +1392,7 @@ static int DetectEngineHttpHHTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1425,7 +1425,7 @@ static int DetectEngineHttpHHTest14(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1491,7 +1491,7 @@ static int DetectEngineHttpHHTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1524,7 +1524,7 @@ static int DetectEngineHttpHHTest15(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1590,7 +1590,7 @@ static int DetectEngineHttpHHTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1623,7 +1623,7 @@ static int DetectEngineHttpHHTest16(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1689,7 +1689,7 @@ static int DetectEngineHttpHHTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1722,7 +1722,7 @@ static int DetectEngineHttpHHTest17(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1788,7 +1788,7 @@ static int DetectEngineHttpHHTest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1817,7 +1817,7 @@ static int DetectEngineHttpHHTest18(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1882,7 +1882,7 @@ static int DetectEngineHttpHHTest18(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1911,7 +1911,7 @@ static int DetectEngineHttpHHTest19(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1976,7 +1976,7 @@ static int DetectEngineHttpHHTest19(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2005,7 +2005,7 @@ static int DetectEngineHttpHHTest20(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2070,7 +2070,7 @@ static int DetectEngineHttpHHTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2098,7 +2098,7 @@ static int DetectEngineHttpHHTest21(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2163,7 +2163,7 @@ static int DetectEngineHttpHHTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2191,7 +2191,7 @@ static int DetectEngineHttpHHTest22(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2256,7 +2256,7 @@ static int DetectEngineHttpHHTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2284,7 +2284,7 @@ static int DetectEngineHttpHHTest23(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2349,7 +2349,7 @@ static int DetectEngineHttpHHTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2378,7 +2378,7 @@ static int DetectEngineHttpHHTest24(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2443,7 +2443,7 @@ static int DetectEngineHttpHHTest24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2472,7 +2472,7 @@ static int DetectEngineHttpHHTest25(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2537,7 +2537,7 @@ static int DetectEngineHttpHHTest25(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hmd.c b/src/detect-engine-hmd.c index ab121f2eb8..d975a1bdbb 100644 --- a/src/detect-engine-hmd.c +++ b/src/detect-engine-hmd.c @@ -139,7 +139,7 @@ static int DetectEngineHttpMethodTest01(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -204,7 +204,7 @@ static int DetectEngineHttpMethodTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -236,7 +236,7 @@ static int DetectEngineHttpMethodTest02(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -301,7 +301,7 @@ static int DetectEngineHttpMethodTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -333,7 +333,7 @@ static int DetectEngineHttpMethodTest03(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -398,7 +398,7 @@ static int DetectEngineHttpMethodTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -430,7 +430,7 @@ static int DetectEngineHttpMethodTest04(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -495,7 +495,7 @@ static int DetectEngineHttpMethodTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -527,7 +527,7 @@ static int DetectEngineHttpMethodTest05(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -592,7 +592,7 @@ static int DetectEngineHttpMethodTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -624,7 +624,7 @@ static int DetectEngineHttpMethodTest06(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -689,7 +689,7 @@ static int DetectEngineHttpMethodTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -721,7 +721,7 @@ static int DetectEngineHttpMethodTest07(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -786,7 +786,7 @@ static int DetectEngineHttpMethodTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -818,7 +818,7 @@ static int DetectEngineHttpMethodTest08(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -883,7 +883,7 @@ static int DetectEngineHttpMethodTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -915,7 +915,7 @@ static int DetectEngineHttpMethodTest09(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -980,7 +980,7 @@ static int DetectEngineHttpMethodTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1012,7 +1012,7 @@ static int DetectEngineHttpMethodTest10(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1078,7 +1078,7 @@ static int DetectEngineHttpMethodTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1110,7 +1110,7 @@ static int DetectEngineHttpMethodTest11(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1176,7 +1176,7 @@ static int DetectEngineHttpMethodTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1208,7 +1208,7 @@ static int DetectEngineHttpMethodTest12(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1274,7 +1274,7 @@ static int DetectEngineHttpMethodTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1306,7 +1306,7 @@ static int DetectEngineHttpMethodTest13(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1372,7 +1372,7 @@ static int DetectEngineHttpMethodTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1404,7 +1404,7 @@ static int DetectEngineHttpMethodTest14(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1470,7 +1470,7 @@ static int DetectEngineHttpMethodTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1502,7 +1502,7 @@ static int DetectEngineHttpMethodTest15(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1568,7 +1568,7 @@ static int DetectEngineHttpMethodTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1600,7 +1600,7 @@ static int DetectEngineHttpMethodTest16(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1666,7 +1666,7 @@ static int DetectEngineHttpMethodTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1698,7 +1698,7 @@ static int DetectEngineHttpMethodTest17(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1764,7 +1764,7 @@ static int DetectEngineHttpMethodTest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hrhd.c b/src/detect-engine-hrhd.c index 64a26a34ff..a5de1d6ea8 100644 --- a/src/detect-engine-hrhd.c +++ b/src/detect-engine-hrhd.c @@ -185,7 +185,7 @@ static int DetectEngineHttpRawHeaderTest01(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -249,7 +249,7 @@ static int DetectEngineHttpRawHeaderTest01(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -281,7 +281,7 @@ static int DetectEngineHttpRawHeaderTest02(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -345,7 +345,7 @@ static int DetectEngineHttpRawHeaderTest02(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -377,7 +377,7 @@ static int DetectEngineHttpRawHeaderTest03(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -441,7 +441,7 @@ static int DetectEngineHttpRawHeaderTest03(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -473,7 +473,7 @@ static int DetectEngineHttpRawHeaderTest04(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -537,7 +537,7 @@ static int DetectEngineHttpRawHeaderTest04(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -569,7 +569,7 @@ static int DetectEngineHttpRawHeaderTest05(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -633,7 +633,7 @@ static int DetectEngineHttpRawHeaderTest05(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -665,7 +665,7 @@ static int DetectEngineHttpRawHeaderTest06(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -729,7 +729,7 @@ static int DetectEngineHttpRawHeaderTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -761,7 +761,7 @@ static int DetectEngineHttpRawHeaderTest07(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -825,7 +825,7 @@ static int DetectEngineHttpRawHeaderTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -857,7 +857,7 @@ static int DetectEngineHttpRawHeaderTest08(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -921,7 +921,7 @@ static int DetectEngineHttpRawHeaderTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -953,7 +953,7 @@ static int DetectEngineHttpRawHeaderTest09(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1017,7 +1017,7 @@ static int DetectEngineHttpRawHeaderTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1049,7 +1049,7 @@ static int DetectEngineHttpRawHeaderTest10(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1113,7 +1113,7 @@ static int DetectEngineHttpRawHeaderTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1145,7 +1145,7 @@ static int DetectEngineHttpRawHeaderTest11(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1209,7 +1209,7 @@ static int DetectEngineHttpRawHeaderTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1241,7 +1241,7 @@ static int DetectEngineHttpRawHeaderTest12(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1305,7 +1305,7 @@ static int DetectEngineHttpRawHeaderTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1337,7 +1337,7 @@ static int DetectEngineHttpRawHeaderTest13(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1401,7 +1401,7 @@ static int DetectEngineHttpRawHeaderTest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1433,7 +1433,7 @@ static int DetectEngineHttpRawHeaderTest14(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1497,7 +1497,7 @@ static int DetectEngineHttpRawHeaderTest14(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1529,7 +1529,7 @@ static int DetectEngineHttpRawHeaderTest15(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1593,7 +1593,7 @@ static int DetectEngineHttpRawHeaderTest15(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1625,7 +1625,7 @@ static int DetectEngineHttpRawHeaderTest16(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1689,7 +1689,7 @@ static int DetectEngineHttpRawHeaderTest16(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1721,7 +1721,7 @@ static int DetectEngineHttpRawHeaderTest17(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1785,7 +1785,7 @@ static int DetectEngineHttpRawHeaderTest17(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1968,7 +1968,7 @@ static int DetectEngineHttpRawHeaderTest20(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2058,7 +2058,7 @@ static int DetectEngineHttpRawHeaderTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2092,7 +2092,7 @@ static int DetectEngineHttpRawHeaderTest21(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2182,7 +2182,7 @@ static int DetectEngineHttpRawHeaderTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2216,7 +2216,7 @@ static int DetectEngineHttpRawHeaderTest22(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2306,7 +2306,7 @@ static int DetectEngineHttpRawHeaderTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2340,7 +2340,7 @@ static int DetectEngineHttpRawHeaderTest23(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2430,7 +2430,7 @@ static int DetectEngineHttpRawHeaderTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2464,7 +2464,7 @@ static int DetectEngineHttpRawHeaderTest24(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2554,7 +2554,7 @@ static int DetectEngineHttpRawHeaderTest24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2588,7 +2588,7 @@ static int DetectEngineHttpRawHeaderTest25(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2678,7 +2678,7 @@ static int DetectEngineHttpRawHeaderTest25(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2712,7 +2712,7 @@ static int DetectEngineHttpRawHeaderTest26(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2834,7 +2834,7 @@ static int DetectEngineHttpRawHeaderTest27(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2924,7 +2924,7 @@ static int DetectEngineHttpRawHeaderTest27(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2963,7 +2963,7 @@ static int DetectEngineHttpRawHeaderTest28(void) "abcdef"; uint32_t http_buf2_len = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3053,7 +3053,7 @@ static int DetectEngineHttpRawHeaderTest28(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3092,7 +3092,7 @@ static int DetectEngineHttpRawHeaderTest29(void) "abcdef"; uint32_t http_buf2_len = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3182,7 +3182,7 @@ static int DetectEngineHttpRawHeaderTest29(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3253,7 +3253,7 @@ static int DetectEngineHttpRawHeaderTest31(void) "\r\n"; uint32_t http1_len = sizeof(http1_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3319,7 +3319,7 @@ static int DetectEngineHttpRawHeaderTest31(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3360,7 +3360,7 @@ static int DetectEngineHttpRawHeaderTest32(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3449,7 +3449,7 @@ static int DetectEngineHttpRawHeaderTest32(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hrhhd.c b/src/detect-engine-hrhhd.c index 94d255f701..b64f20436a 100644 --- a/src/detect-engine-hrhhd.c +++ b/src/detect-engine-hrhhd.c @@ -174,7 +174,7 @@ static int DetectEngineHttpHRHTest01(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -239,7 +239,7 @@ static int DetectEngineHttpHRHTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -272,7 +272,7 @@ static int DetectEngineHttpHRHTest02(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -337,7 +337,7 @@ static int DetectEngineHttpHRHTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -370,7 +370,7 @@ static int DetectEngineHttpHRHTest03(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -435,7 +435,7 @@ static int DetectEngineHttpHRHTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -468,7 +468,7 @@ static int DetectEngineHttpHRHTest04(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -533,7 +533,7 @@ static int DetectEngineHttpHRHTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -566,7 +566,7 @@ static int DetectEngineHttpHRHTest05(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -631,7 +631,7 @@ static int DetectEngineHttpHRHTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -664,7 +664,7 @@ static int DetectEngineHttpHRHTest06(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -729,7 +729,7 @@ static int DetectEngineHttpHRHTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -762,7 +762,7 @@ static int DetectEngineHttpHRHTest07(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -827,7 +827,7 @@ static int DetectEngineHttpHRHTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -860,7 +860,7 @@ static int DetectEngineHttpHRHTest08(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -925,7 +925,7 @@ static int DetectEngineHttpHRHTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -958,7 +958,7 @@ static int DetectEngineHttpHRHTest09(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1023,7 +1023,7 @@ static int DetectEngineHttpHRHTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1056,7 +1056,7 @@ static int DetectEngineHttpHRHTest10(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1122,7 +1122,7 @@ static int DetectEngineHttpHRHTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1155,7 +1155,7 @@ static int DetectEngineHttpHRHTest11(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1221,7 +1221,7 @@ static int DetectEngineHttpHRHTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1254,7 +1254,7 @@ static int DetectEngineHttpHRHTest12(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1320,7 +1320,7 @@ static int DetectEngineHttpHRHTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1353,7 +1353,7 @@ static int DetectEngineHttpHRHTest13(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1419,7 +1419,7 @@ static int DetectEngineHttpHRHTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1452,7 +1452,7 @@ static int DetectEngineHttpHRHTest14(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1518,7 +1518,7 @@ static int DetectEngineHttpHRHTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1551,7 +1551,7 @@ static int DetectEngineHttpHRHTest15(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1617,7 +1617,7 @@ static int DetectEngineHttpHRHTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1650,7 +1650,7 @@ static int DetectEngineHttpHRHTest16(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1716,7 +1716,7 @@ static int DetectEngineHttpHRHTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1749,7 +1749,7 @@ static int DetectEngineHttpHRHTest17(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1815,7 +1815,7 @@ static int DetectEngineHttpHRHTest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1844,7 +1844,7 @@ static int DetectEngineHttpHRHTest18(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1909,7 +1909,7 @@ static int DetectEngineHttpHRHTest18(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1938,7 +1938,7 @@ static int DetectEngineHttpHRHTest19(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2003,7 +2003,7 @@ static int DetectEngineHttpHRHTest19(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2032,7 +2032,7 @@ static int DetectEngineHttpHRHTest20(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2097,7 +2097,7 @@ static int DetectEngineHttpHRHTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2125,7 +2125,7 @@ static int DetectEngineHttpHRHTest21(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2190,7 +2190,7 @@ static int DetectEngineHttpHRHTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2218,7 +2218,7 @@ static int DetectEngineHttpHRHTest22(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2283,7 +2283,7 @@ static int DetectEngineHttpHRHTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2311,7 +2311,7 @@ static int DetectEngineHttpHRHTest23(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2376,7 +2376,7 @@ static int DetectEngineHttpHRHTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2405,7 +2405,7 @@ static int DetectEngineHttpHRHTest24(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2470,7 +2470,7 @@ static int DetectEngineHttpHRHTest24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2499,7 +2499,7 @@ static int DetectEngineHttpHRHTest25(void) "User-Agent: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2564,7 +2564,7 @@ static int DetectEngineHttpHRHTest25(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hrud.c b/src/detect-engine-hrud.c index 8045094f18..a40ddff362 100644 --- a/src/detect-engine-hrud.c +++ b/src/detect-engine-hrud.c @@ -153,7 +153,7 @@ static int DetectEngineHttpRawUriTest01(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -242,7 +242,7 @@ static int DetectEngineHttpRawUriTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -277,7 +277,7 @@ static int DetectEngineHttpRawUriTest02(void) "This is dummy body1"; uint32_t http1_len = sizeof(http1_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -348,7 +348,7 @@ static int DetectEngineHttpRawUriTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -387,7 +387,7 @@ static int DetectEngineHttpRawUriTest03(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -476,7 +476,7 @@ static int DetectEngineHttpRawUriTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -515,7 +515,7 @@ static int DetectEngineHttpRawUriTest04(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -604,7 +604,7 @@ static int DetectEngineHttpRawUriTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -642,7 +642,7 @@ static int DetectEngineHttpRawUriTest05(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -731,7 +731,7 @@ static int DetectEngineHttpRawUriTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -769,7 +769,7 @@ static int DetectEngineHttpRawUriTest06(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -858,7 +858,7 @@ static int DetectEngineHttpRawUriTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -896,7 +896,7 @@ static int DetectEngineHttpRawUriTest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -985,7 +985,7 @@ static int DetectEngineHttpRawUriTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1023,7 +1023,7 @@ static int DetectEngineHttpRawUriTest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1112,7 +1112,7 @@ static int DetectEngineHttpRawUriTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1150,7 +1150,7 @@ static int DetectEngineHttpRawUriTest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1240,7 +1240,7 @@ static int DetectEngineHttpRawUriTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1278,7 +1278,7 @@ static int DetectEngineHttpRawUriTest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1368,7 +1368,7 @@ static int DetectEngineHttpRawUriTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1406,7 +1406,7 @@ static int DetectEngineHttpRawUriTest11(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1496,7 +1496,7 @@ static int DetectEngineHttpRawUriTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1534,7 +1534,7 @@ static int DetectEngineHttpRawUriTest12(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1624,7 +1624,7 @@ static int DetectEngineHttpRawUriTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1662,7 +1662,7 @@ static int DetectEngineHttpRawUriTest13(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1752,7 +1752,7 @@ static int DetectEngineHttpRawUriTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1790,7 +1790,7 @@ static int DetectEngineHttpRawUriTest14(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1880,7 +1880,7 @@ static int DetectEngineHttpRawUriTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1918,7 +1918,7 @@ static int DetectEngineHttpRawUriTest15(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2008,7 +2008,7 @@ static int DetectEngineHttpRawUriTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2046,7 +2046,7 @@ static int DetectEngineHttpRawUriTest16(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2136,7 +2136,7 @@ static int DetectEngineHttpRawUriTest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2462,7 +2462,7 @@ static int DetectEngineHttpRawUriTest21(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2552,7 +2552,7 @@ static int DetectEngineHttpRawUriTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2590,7 +2590,7 @@ static int DetectEngineHttpRawUriTest22(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2680,7 +2680,7 @@ static int DetectEngineHttpRawUriTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2718,7 +2718,7 @@ static int DetectEngineHttpRawUriTest23(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2808,7 +2808,7 @@ static int DetectEngineHttpRawUriTest23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2846,7 +2846,7 @@ static int DetectEngineHttpRawUriTest24(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2936,7 +2936,7 @@ static int DetectEngineHttpRawUriTest24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2974,7 +2974,7 @@ static int DetectEngineHttpRawUriTest25(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3064,7 +3064,7 @@ static int DetectEngineHttpRawUriTest25(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3102,7 +3102,7 @@ static int DetectEngineHttpRawUriTest26(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3192,7 +3192,7 @@ static int DetectEngineHttpRawUriTest26(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3230,7 +3230,7 @@ static int DetectEngineHttpRawUriTest27(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3320,7 +3320,7 @@ static int DetectEngineHttpRawUriTest27(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3358,7 +3358,7 @@ static int DetectEngineHttpRawUriTest28(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3448,7 +3448,7 @@ static int DetectEngineHttpRawUriTest28(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3478,7 +3478,7 @@ static int DetectEngineHttpRawUriTest29(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3544,7 +3544,7 @@ static int DetectEngineHttpRawUriTest29(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3573,7 +3573,7 @@ static int DetectEngineHttpRawUriTest30(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3638,7 +3638,7 @@ static int DetectEngineHttpRawUriTest30(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hsbd.c b/src/detect-engine-hsbd.c index b8108178af..95d37a913a 100644 --- a/src/detect-engine-hsbd.c +++ b/src/detect-engine-hsbd.c @@ -324,7 +324,7 @@ static int DetectEngineHttpServerBodyTest01(void) "message"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -413,7 +413,7 @@ static int DetectEngineHttpServerBodyTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -451,7 +451,7 @@ static int DetectEngineHttpServerBodyTest02(void) "xxxxABC"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -527,7 +527,7 @@ static int DetectEngineHttpServerBodyTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -568,7 +568,7 @@ static int DetectEngineHttpServerBodyTest03(void) uint8_t http_buf3[] = "8901234ABC"; uint32_t http_len3 = sizeof(http_buf3) - 1; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -667,7 +667,7 @@ static int DetectEngineHttpServerBodyTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -706,7 +706,7 @@ static int DetectEngineHttpServerBodyTest04(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -795,7 +795,7 @@ static int DetectEngineHttpServerBodyTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -834,7 +834,7 @@ static int DetectEngineHttpServerBodyTest05(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -923,7 +923,7 @@ static int DetectEngineHttpServerBodyTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -962,7 +962,7 @@ static int DetectEngineHttpServerBodyTest06(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1051,7 +1051,7 @@ static int DetectEngineHttpServerBodyTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1090,7 +1090,7 @@ static int DetectEngineHttpServerBodyTest07(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1179,7 +1179,7 @@ static int DetectEngineHttpServerBodyTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1218,7 +1218,7 @@ static int DetectEngineHttpServerBodyTest08(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1307,7 +1307,7 @@ static int DetectEngineHttpServerBodyTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1346,7 +1346,7 @@ static int DetectEngineHttpServerBodyTest09(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1436,7 +1436,7 @@ static int DetectEngineHttpServerBodyTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1475,7 +1475,7 @@ static int DetectEngineHttpServerBodyTest10(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1565,7 +1565,7 @@ static int DetectEngineHttpServerBodyTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1604,7 +1604,7 @@ static int DetectEngineHttpServerBodyTest11(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1694,7 +1694,7 @@ static int DetectEngineHttpServerBodyTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1733,7 +1733,7 @@ static int DetectEngineHttpServerBodyTest12(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1823,7 +1823,7 @@ static int DetectEngineHttpServerBodyTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1862,7 +1862,7 @@ static int DetectEngineHttpServerBodyTest13(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1952,7 +1952,7 @@ static int DetectEngineHttpServerBodyTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1991,7 +1991,7 @@ static int DetectEngineHttpServerBodyTest14(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2081,7 +2081,7 @@ static int DetectEngineHttpServerBodyTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2120,7 +2120,7 @@ static int DetectEngineHttpServerBodyTest15(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2210,7 +2210,7 @@ static int DetectEngineHttpServerBodyTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2275,7 +2275,7 @@ libhtp:\n\ uint8_t http_buf3[] = "8901234ABC"; uint32_t http_len3 = sizeof(http_buf3) - 1; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2382,7 +2382,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); HtpConfigRestoreBackup(); ConfRestoreContextBackup(); @@ -2451,7 +2451,7 @@ libhtp:\n\ uint8_t http_buf3[] = "8901234ABC"; uint32_t http_len3 = sizeof(http_buf3) - 1; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2558,7 +2558,7 @@ libhtp:\n\ end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); HTPFreeConfig(); HtpConfigRestoreBackup(); ConfRestoreContextBackup(); @@ -2611,7 +2611,7 @@ static int DetectEngineHttpServerBodyTest18(void) }; uint32_t http_len2 = sizeof(http_buf2); int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2694,7 +2694,7 @@ static int DetectEngineHttpServerBodyTest18(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2741,7 +2741,7 @@ static int DetectEngineHttpServerBodyTest19(void) // 0xb2, 0x7d, 0xac, 0x9b, 0x19, 0x00, 0x00, 0x00, uint32_t http_len2 = sizeof(http_buf2); int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2824,7 +2824,7 @@ static int DetectEngineHttpServerBodyTest19(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2871,7 +2871,7 @@ static int DetectEngineHttpServerBodyTest20(void) // 0xb2, 0x7d, 0xac, 0x9b, 0x19, 0x00, 0x00, 0x00, uint32_t http_len2 = sizeof(http_buf2); int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2954,7 +2954,7 @@ static int DetectEngineHttpServerBodyTest20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3003,7 +3003,7 @@ static int DetectEngineHttpServerBodyTest21(void) }; uint32_t http_len2 = sizeof(http_buf2); int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3086,7 +3086,7 @@ static int DetectEngineHttpServerBodyTest21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3137,7 +3137,7 @@ static int DetectEngineHttpServerBodyTest22(void) }; uint32_t http_len2 = sizeof(http_buf2); int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3220,7 +3220,7 @@ static int DetectEngineHttpServerBodyTest22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3259,7 +3259,7 @@ static int DetectEngineHttpServerBodyFileDataTest01(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3349,7 +3349,7 @@ static int DetectEngineHttpServerBodyFileDataTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3388,7 +3388,7 @@ static int DetectEngineHttpServerBodyFileDataTest02(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3478,7 +3478,7 @@ static int DetectEngineHttpServerBodyFileDataTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3518,7 +3518,7 @@ static int DetectEngineHttpServerBodyFileDataTest03(void) "XYZ_klm_1234abcd_XYZ_klm_5678abcd"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3615,7 +3615,7 @@ static int DetectEngineHttpServerBodyFileDataTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hscd.c b/src/detect-engine-hscd.c index b4362469fa..4200b5ccf1 100644 --- a/src/detect-engine-hscd.c +++ b/src/detect-engine-hscd.c @@ -150,7 +150,7 @@ static int DetectEngineHttpStatCodeTest01(void) "message"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -239,7 +239,7 @@ static int DetectEngineHttpStatCodeTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -277,7 +277,7 @@ static int DetectEngineHttpStatCodeTest02(void) "xxxxABC"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -353,7 +353,7 @@ static int DetectEngineHttpStatCodeTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -394,7 +394,7 @@ static int DetectEngineHttpStatCodeTest03(void) "\r\n" "12345678901234ABC"; uint32_t http_len3 = sizeof(http_buf3) - 1; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -493,7 +493,7 @@ static int DetectEngineHttpStatCodeTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -532,7 +532,7 @@ static int DetectEngineHttpStatCodeTest04(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -621,7 +621,7 @@ static int DetectEngineHttpStatCodeTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -660,7 +660,7 @@ static int DetectEngineHttpStatCodeTest05(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -749,7 +749,7 @@ static int DetectEngineHttpStatCodeTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -788,7 +788,7 @@ static int DetectEngineHttpStatCodeTest06(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -877,7 +877,7 @@ static int DetectEngineHttpStatCodeTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -916,7 +916,7 @@ static int DetectEngineHttpStatCodeTest07(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1005,7 +1005,7 @@ static int DetectEngineHttpStatCodeTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1044,7 +1044,7 @@ static int DetectEngineHttpStatCodeTest08(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1133,7 +1133,7 @@ static int DetectEngineHttpStatCodeTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1172,7 +1172,7 @@ static int DetectEngineHttpStatCodeTest09(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1262,7 +1262,7 @@ static int DetectEngineHttpStatCodeTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1301,7 +1301,7 @@ static int DetectEngineHttpStatCodeTest10(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1391,7 +1391,7 @@ static int DetectEngineHttpStatCodeTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1430,7 +1430,7 @@ static int DetectEngineHttpStatCodeTest11(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1520,7 +1520,7 @@ static int DetectEngineHttpStatCodeTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1559,7 +1559,7 @@ static int DetectEngineHttpStatCodeTest12(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1649,7 +1649,7 @@ static int DetectEngineHttpStatCodeTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1688,7 +1688,7 @@ static int DetectEngineHttpStatCodeTest13(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1778,7 +1778,7 @@ static int DetectEngineHttpStatCodeTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1817,7 +1817,7 @@ static int DetectEngineHttpStatCodeTest14(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1907,7 +1907,7 @@ static int DetectEngineHttpStatCodeTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1946,7 +1946,7 @@ static int DetectEngineHttpStatCodeTest15(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2036,7 +2036,7 @@ static int DetectEngineHttpStatCodeTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hsmd.c b/src/detect-engine-hsmd.c index 797505c22e..4a210a2900 100644 --- a/src/detect-engine-hsmd.c +++ b/src/detect-engine-hsmd.c @@ -150,7 +150,7 @@ static int DetectEngineHttpStatMsgTest01(void) "message"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -239,7 +239,7 @@ static int DetectEngineHttpStatMsgTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -277,7 +277,7 @@ static int DetectEngineHttpStatMsgTest02(void) "xxxxABC"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -353,7 +353,7 @@ static int DetectEngineHttpStatMsgTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -394,7 +394,7 @@ static int DetectEngineHttpStatMsgTest03(void) "\r\n" "12345678901234ABC"; uint32_t http_len3 = sizeof(http_buf3) - 1; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -493,7 +493,7 @@ static int DetectEngineHttpStatMsgTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -532,7 +532,7 @@ static int DetectEngineHttpStatMsgTest04(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -621,7 +621,7 @@ static int DetectEngineHttpStatMsgTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -660,7 +660,7 @@ static int DetectEngineHttpStatMsgTest05(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -749,7 +749,7 @@ static int DetectEngineHttpStatMsgTest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -788,7 +788,7 @@ static int DetectEngineHttpStatMsgTest06(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -877,7 +877,7 @@ static int DetectEngineHttpStatMsgTest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -916,7 +916,7 @@ static int DetectEngineHttpStatMsgTest07(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1005,7 +1005,7 @@ static int DetectEngineHttpStatMsgTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1044,7 +1044,7 @@ static int DetectEngineHttpStatMsgTest08(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1133,7 +1133,7 @@ static int DetectEngineHttpStatMsgTest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1172,7 +1172,7 @@ static int DetectEngineHttpStatMsgTest09(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1262,7 +1262,7 @@ static int DetectEngineHttpStatMsgTest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1301,7 +1301,7 @@ static int DetectEngineHttpStatMsgTest10(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1391,7 +1391,7 @@ static int DetectEngineHttpStatMsgTest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1430,7 +1430,7 @@ static int DetectEngineHttpStatMsgTest11(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1520,7 +1520,7 @@ static int DetectEngineHttpStatMsgTest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1559,7 +1559,7 @@ static int DetectEngineHttpStatMsgTest12(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1649,7 +1649,7 @@ static int DetectEngineHttpStatMsgTest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1688,7 +1688,7 @@ static int DetectEngineHttpStatMsgTest13(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1778,7 +1778,7 @@ static int DetectEngineHttpStatMsgTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1817,7 +1817,7 @@ static int DetectEngineHttpStatMsgTest14(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1907,7 +1907,7 @@ static int DetectEngineHttpStatMsgTest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1946,7 +1946,7 @@ static int DetectEngineHttpStatMsgTest15(void) "abcdef"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2036,7 +2036,7 @@ static int DetectEngineHttpStatMsgTest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-hua.c b/src/detect-engine-hua.c index 42b9384af3..c42e08fe90 100644 --- a/src/detect-engine-hua.c +++ b/src/detect-engine-hua.c @@ -151,7 +151,7 @@ static int DetectEngineHttpUATest01(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -216,7 +216,7 @@ static int DetectEngineHttpUATest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -249,7 +249,7 @@ static int DetectEngineHttpUATest02(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -314,7 +314,7 @@ static int DetectEngineHttpUATest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -347,7 +347,7 @@ static int DetectEngineHttpUATest03(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -412,7 +412,7 @@ static int DetectEngineHttpUATest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -445,7 +445,7 @@ static int DetectEngineHttpUATest04(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -510,7 +510,7 @@ static int DetectEngineHttpUATest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -543,7 +543,7 @@ static int DetectEngineHttpUATest05(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -608,7 +608,7 @@ static int DetectEngineHttpUATest05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -641,7 +641,7 @@ static int DetectEngineHttpUATest06(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -706,7 +706,7 @@ static int DetectEngineHttpUATest06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -739,7 +739,7 @@ static int DetectEngineHttpUATest07(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -804,7 +804,7 @@ static int DetectEngineHttpUATest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -837,7 +837,7 @@ static int DetectEngineHttpUATest08(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -902,7 +902,7 @@ static int DetectEngineHttpUATest08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -935,7 +935,7 @@ static int DetectEngineHttpUATest09(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1000,7 +1000,7 @@ static int DetectEngineHttpUATest09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1033,7 +1033,7 @@ static int DetectEngineHttpUATest10(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1099,7 +1099,7 @@ static int DetectEngineHttpUATest10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1132,7 +1132,7 @@ static int DetectEngineHttpUATest11(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1198,7 +1198,7 @@ static int DetectEngineHttpUATest11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1231,7 +1231,7 @@ static int DetectEngineHttpUATest12(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1297,7 +1297,7 @@ static int DetectEngineHttpUATest12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1330,7 +1330,7 @@ static int DetectEngineHttpUATest13(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1396,7 +1396,7 @@ static int DetectEngineHttpUATest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1429,7 +1429,7 @@ static int DetectEngineHttpUATest14(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1495,7 +1495,7 @@ static int DetectEngineHttpUATest14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1528,7 +1528,7 @@ static int DetectEngineHttpUATest15(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1594,7 +1594,7 @@ static int DetectEngineHttpUATest15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1627,7 +1627,7 @@ static int DetectEngineHttpUATest16(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1693,7 +1693,7 @@ static int DetectEngineHttpUATest16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1726,7 +1726,7 @@ static int DetectEngineHttpUATest17(void) "Host: www.onetwothreefourfivesixseven.org\r\n\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1792,7 +1792,7 @@ static int DetectEngineHttpUATest17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-engine-state.c b/src/detect-engine-state.c index da8e0bdcf9..d046dff905 100644 --- a/src/detect-engine-state.c +++ b/src/detect-engine-state.c @@ -913,7 +913,7 @@ static int DeStateSigTest01(void) uint32_t httplen3 = sizeof(httpbuf3) - 1; /* minus the \0 */ uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1018,7 +1018,7 @@ static int DeStateSigTest01(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (http_state != NULL) { HTPStateFree(http_state); } @@ -1059,7 +1059,7 @@ static int DeStateSigTest02(void) { uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ uint32_t httplen7 = sizeof(httpbuf7) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1219,7 +1219,7 @@ static int DeStateSigTest02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -1253,7 +1253,7 @@ static int DeStateSigTest03(void) { Flow *f = NULL; Packet *p = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&ssn, 0, sizeof(ssn)); @@ -1346,7 +1346,7 @@ static int DeStateSigTest03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreeFlow(f); if (det_ctx != NULL) { @@ -1379,7 +1379,7 @@ static int DeStateSigTest04(void) { Flow *f = NULL; Packet *p = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&ssn, 0, sizeof(ssn)); @@ -1472,7 +1472,7 @@ static int DeStateSigTest04(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreeFlow(f); if (det_ctx != NULL) { @@ -1505,7 +1505,7 @@ static int DeStateSigTest05(void) { Flow *f = NULL; Packet *p = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&ssn, 0, sizeof(ssn)); @@ -1598,7 +1598,7 @@ static int DeStateSigTest05(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreeFlow(f); if (det_ctx != NULL) { @@ -1631,7 +1631,7 @@ static int DeStateSigTest06(void) { Flow *f = NULL; Packet *p = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&ssn, 0, sizeof(ssn)); @@ -1724,7 +1724,7 @@ static int DeStateSigTest06(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreeFlow(f); if (det_ctx != NULL) { @@ -1759,7 +1759,7 @@ static int DeStateSigTest07(void) { Flow *f = NULL; Packet *p = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&ssn, 0, sizeof(ssn)); @@ -1870,7 +1870,7 @@ static int DeStateSigTest07(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreeFlow(f); if (det_ctx != NULL) { diff --git a/src/detect-engine-uri.c b/src/detect-engine-uri.c index da3b734fa7..39395d2bbc 100644 --- a/src/detect-engine-uri.c +++ b/src/detect-engine-uri.c @@ -125,7 +125,7 @@ static int UriTestSig01(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -215,7 +215,7 @@ static int UriTestSig01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -248,7 +248,7 @@ static int UriTestSig02(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -338,7 +338,7 @@ static int UriTestSig02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -371,7 +371,7 @@ static int UriTestSig03(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -461,7 +461,7 @@ static int UriTestSig03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -494,7 +494,7 @@ static int UriTestSig04(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -584,7 +584,7 @@ static int UriTestSig04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -617,7 +617,7 @@ static int UriTestSig05(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -707,7 +707,7 @@ static int UriTestSig05(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -740,7 +740,7 @@ static int UriTestSig06(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -830,7 +830,7 @@ static int UriTestSig06(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -863,7 +863,7 @@ static int UriTestSig07(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -953,7 +953,7 @@ static int UriTestSig07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -986,7 +986,7 @@ static int UriTestSig08(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1076,7 +1076,7 @@ static int UriTestSig08(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1109,7 +1109,7 @@ static int UriTestSig09(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1199,7 +1199,7 @@ static int UriTestSig09(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1232,7 +1232,7 @@ static int UriTestSig10(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1322,7 +1322,7 @@ static int UriTestSig10(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1355,7 +1355,7 @@ static int UriTestSig11(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1446,7 +1446,7 @@ static int UriTestSig11(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1479,7 +1479,7 @@ static int UriTestSig12(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1570,7 +1570,7 @@ static int UriTestSig12(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1603,7 +1603,7 @@ static int UriTestSig13(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1694,7 +1694,7 @@ static int UriTestSig13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1727,7 +1727,7 @@ static int UriTestSig14(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1818,7 +1818,7 @@ static int UriTestSig14(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1851,7 +1851,7 @@ static int UriTestSig15(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -1942,7 +1942,7 @@ static int UriTestSig15(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -1975,7 +1975,7 @@ static int UriTestSig16(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2066,7 +2066,7 @@ static int UriTestSig16(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2095,7 +2095,7 @@ static int UriTestSig17(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2162,7 +2162,7 @@ static int UriTestSig17(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2191,7 +2191,7 @@ static int UriTestSig18(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2258,7 +2258,7 @@ static int UriTestSig18(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2287,7 +2287,7 @@ static int UriTestSig19(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2355,7 +2355,7 @@ static int UriTestSig19(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2384,7 +2384,7 @@ static int UriTestSig20(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2451,7 +2451,7 @@ static int UriTestSig20(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2480,7 +2480,7 @@ static int UriTestSig21(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2546,7 +2546,7 @@ static int UriTestSig21(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2576,7 +2576,7 @@ static int UriTestSig22(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2641,7 +2641,7 @@ static int UriTestSig22(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2670,7 +2670,7 @@ static int UriTestSig23(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2735,7 +2735,7 @@ static int UriTestSig23(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2764,7 +2764,7 @@ static int UriTestSig24(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2829,7 +2829,7 @@ static int UriTestSig24(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2858,7 +2858,7 @@ static int UriTestSig25(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -2923,7 +2923,7 @@ static int UriTestSig25(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -2952,7 +2952,7 @@ static int UriTestSig26(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3017,7 +3017,7 @@ static int UriTestSig26(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3046,7 +3046,7 @@ static int UriTestSig27(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3111,7 +3111,7 @@ static int UriTestSig27(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3172,7 +3172,7 @@ static int UriTestSig28(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3239,7 +3239,7 @@ static int UriTestSig28(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3265,7 +3265,7 @@ static int UriTestSig29(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3332,7 +3332,7 @@ static int UriTestSig29(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3358,7 +3358,7 @@ static int UriTestSig30(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3425,7 +3425,7 @@ static int UriTestSig30(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3451,7 +3451,7 @@ static int UriTestSig31(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3518,7 +3518,7 @@ static int UriTestSig31(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3544,7 +3544,7 @@ static int UriTestSig32(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3611,7 +3611,7 @@ static int UriTestSig32(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3637,7 +3637,7 @@ static int UriTestSig33(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3702,7 +3702,7 @@ static int UriTestSig33(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3728,7 +3728,7 @@ static int UriTestSig34(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3793,7 +3793,7 @@ static int UriTestSig34(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3819,7 +3819,7 @@ static int UriTestSig35(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3884,7 +3884,7 @@ static int UriTestSig35(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -3910,7 +3910,7 @@ static int UriTestSig36(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -3975,7 +3975,7 @@ static int UriTestSig36(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -4001,7 +4001,7 @@ static int UriTestSig37(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -4066,7 +4066,7 @@ static int UriTestSig37(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -4092,7 +4092,7 @@ static int UriTestSig38(void) Packet *p = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -4157,7 +4157,7 @@ static int UriTestSig38(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) diff --git a/src/detect-ftpbounce.c b/src/detect-ftpbounce.c index cedbdd6219..650bec3047 100644 --- a/src/detect-ftpbounce.c +++ b/src/detect-ftpbounce.c @@ -293,7 +293,7 @@ static int DetectFtpbounceTestALMatch02(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -388,7 +388,7 @@ static int DetectFtpbounceTestALMatch02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -427,7 +427,7 @@ static int DetectFtpbounceTestALMatch03(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(p, 0, SIZE_OF_PACKET); @@ -529,7 +529,7 @@ static int DetectFtpbounceTestALMatch03(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-http-client-body.c b/src/detect-http-client-body.c index ff31d2e29f..f536f2882f 100644 --- a/src/detect-http-client-body.c +++ b/src/detect-http-client-body.c @@ -307,7 +307,7 @@ static int DetectHttpClientBodyTest06(void) "This is dummy message body"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -372,7 +372,7 @@ static int DetectHttpClientBodyTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -413,7 +413,7 @@ static int DetectHttpClientBodyTest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -498,7 +498,7 @@ static int DetectHttpClientBodyTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -540,7 +540,7 @@ static int DetectHttpClientBodyTest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -628,7 +628,7 @@ static int DetectHttpClientBodyTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -670,7 +670,7 @@ static int DetectHttpClientBodyTest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -758,7 +758,7 @@ static int DetectHttpClientBodyTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -800,7 +800,7 @@ static int DetectHttpClientBodyTest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -888,7 +888,7 @@ static int DetectHttpClientBodyTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -926,7 +926,7 @@ static int DetectHttpClientBodyTest11(void) "This is dummy message body"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -991,7 +991,7 @@ static int DetectHttpClientBodyTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1028,7 +1028,7 @@ static int DetectHttpClientBodyTest12(void) "This is dummy message body"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1093,7 +1093,7 @@ static int DetectHttpClientBodyTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1130,7 +1130,7 @@ static int DetectHttpClientBodyTest13(void) "longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1195,7 +1195,7 @@ static int DetectHttpClientBodyTest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1232,7 +1232,7 @@ static int DetectHttpClientBodyTest14(void) { uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ uint32_t httplen7 = sizeof(httpbuf7) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1412,7 +1412,7 @@ static int DetectHttpClientBodyTest14(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -1450,7 +1450,7 @@ static int DetectHttpClientBodyTest15(void) { uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ uint32_t httplen7 = sizeof(httpbuf7) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1659,7 +1659,7 @@ static int DetectHttpClientBodyTest15(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } diff --git a/src/detect-http-cookie.c b/src/detect-http-cookie.c index 076fcca84c..c3a7999fa7 100644 --- a/src/detect-http-cookie.c +++ b/src/detect-http-cookie.c @@ -324,7 +324,7 @@ static int DetectHttpCookieSigTest01(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -401,7 +401,7 @@ static int DetectHttpCookieSigTest01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -428,7 +428,7 @@ static int DetectHttpCookieSigTest02(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -495,7 +495,7 @@ static int DetectHttpCookieSigTest02(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -521,7 +521,7 @@ static int DetectHttpCookieSigTest03(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -586,7 +586,7 @@ static int DetectHttpCookieSigTest03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -613,7 +613,7 @@ static int DetectHttpCookieSigTest04(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -679,7 +679,7 @@ static int DetectHttpCookieSigTest04(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -706,7 +706,7 @@ static int DetectHttpCookieSigTest05(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -772,7 +772,7 @@ static int DetectHttpCookieSigTest05(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -799,7 +799,7 @@ static int DetectHttpCookieSigTest06(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -892,7 +892,7 @@ static int DetectHttpCookieSigTest07(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -997,7 +997,7 @@ static int DetectHttpCookieSigTest08(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1128,7 +1128,7 @@ static int DetectHttpCookieSigTest09(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); diff --git a/src/detect-http-header.c b/src/detect-http-header.c index a8a46b6d4f..a1902dceef 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -315,7 +315,7 @@ static int DetectHttpHeaderTest06(void) "This is dummy message body\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -379,7 +379,7 @@ static int DetectHttpHeaderTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -419,7 +419,7 @@ static int DetectHttpHeaderTest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -506,7 +506,7 @@ static int DetectHttpHeaderTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -546,7 +546,7 @@ static int DetectHttpHeaderTest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -633,7 +633,7 @@ static int DetectHttpHeaderTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -674,7 +674,7 @@ static int DetectHttpHeaderTest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -762,7 +762,7 @@ static int DetectHttpHeaderTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -803,7 +803,7 @@ static int DetectHttpHeaderTest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -890,7 +890,7 @@ static int DetectHttpHeaderTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -928,7 +928,7 @@ static int DetectHttpHeaderTest11(void) "This is dummy message body\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -992,7 +992,7 @@ static int DetectHttpHeaderTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1029,7 +1029,7 @@ static int DetectHttpHeaderTest12(void) "This is dummy message body\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1093,7 +1093,7 @@ static int DetectHttpHeaderTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1130,7 +1130,7 @@ static int DetectHttpHeaderTest13(void) "longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1195,7 +1195,7 @@ static int DetectHttpHeaderTest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1539,7 +1539,7 @@ static int DetectHttpHeaderTest28(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1595,7 +1595,7 @@ static int DetectHttpHeaderTest28(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1626,7 +1626,7 @@ static int DetectHttpHeaderTest29(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1682,7 +1682,7 @@ static int DetectHttpHeaderTest29(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1713,7 +1713,7 @@ static int DetectHttpHeaderTest30(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1769,7 +1769,7 @@ static int DetectHttpHeaderTest30(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-http-hh.c b/src/detect-http-hh.c index 179aaf91a9..d949ad988b 100644 --- a/src/detect-http-hh.c +++ b/src/detect-http-hh.c @@ -292,7 +292,7 @@ static int DetectHttpHHTest06(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -357,7 +357,7 @@ static int DetectHttpHHTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -394,7 +394,7 @@ static int DetectHttpHHTest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -479,7 +479,7 @@ static int DetectHttpHHTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -517,7 +517,7 @@ static int DetectHttpHHTest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -605,7 +605,7 @@ static int DetectHttpHHTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -647,7 +647,7 @@ static int DetectHttpHHTest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -735,7 +735,7 @@ static int DetectHttpHHTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -777,7 +777,7 @@ static int DetectHttpHHTest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -866,7 +866,7 @@ static int DetectHttpHHTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -902,7 +902,7 @@ static int DetectHttpHHTest11(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -967,7 +967,7 @@ static int DetectHttpHHTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1001,7 +1001,7 @@ static int DetectHttpHHTest12(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1066,7 +1066,7 @@ static int DetectHttpHHTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1101,7 +1101,7 @@ static int DetectHttpHHTest13(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1166,7 +1166,7 @@ static int DetectHttpHHTest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1204,7 +1204,7 @@ static int DetectHttpHHTest14(void) uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1365,7 +1365,7 @@ static int DetectHttpHHTest14(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } diff --git a/src/detect-http-hrh.c b/src/detect-http-hrh.c index 297fab0e8d..65a85b541d 100644 --- a/src/detect-http-hrh.c +++ b/src/detect-http-hrh.c @@ -292,7 +292,7 @@ static int DetectHttpHRHTest06(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -357,7 +357,7 @@ static int DetectHttpHRHTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -394,7 +394,7 @@ static int DetectHttpHRHTest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -479,7 +479,7 @@ static int DetectHttpHRHTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -517,7 +517,7 @@ static int DetectHttpHRHTest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -605,7 +605,7 @@ static int DetectHttpHRHTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -647,7 +647,7 @@ static int DetectHttpHRHTest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -735,7 +735,7 @@ static int DetectHttpHRHTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -777,7 +777,7 @@ static int DetectHttpHRHTest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -865,7 +865,7 @@ static int DetectHttpHRHTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -901,7 +901,7 @@ static int DetectHttpHRHTest11(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -966,7 +966,7 @@ static int DetectHttpHRHTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1000,7 +1000,7 @@ static int DetectHttpHRHTest12(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1065,7 +1065,7 @@ static int DetectHttpHRHTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1100,7 +1100,7 @@ static int DetectHttpHRHTest13(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1165,7 +1165,7 @@ static int DetectHttpHRHTest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1203,7 +1203,7 @@ static int DetectHttpHRHTest14(void) uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1364,7 +1364,7 @@ static int DetectHttpHRHTest14(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2084,7 +2084,7 @@ static int DetectHttpHRHTest37(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2172,7 +2172,7 @@ static int DetectHttpHRHTest37(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-http-method.c b/src/detect-http-method.c index 3941e6695a..50a897d827 100644 --- a/src/detect-http-method.c +++ b/src/detect-http-method.c @@ -410,7 +410,7 @@ static int DetectHttpMethodSigTest01(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -487,7 +487,7 @@ static int DetectHttpMethodSigTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -513,7 +513,7 @@ static int DetectHttpMethodSigTest02(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -590,7 +590,7 @@ static int DetectHttpMethodSigTest02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&th_v, (void *) det_ctx); @@ -615,7 +615,7 @@ static int DetectHttpMethodSigTest03(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -681,7 +681,7 @@ static int DetectHttpMethodSigTest03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -707,7 +707,7 @@ static int DetectHttpMethodSigTest04(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -782,7 +782,7 @@ static int DetectHttpMethodSigTest04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-http-raw-header.c b/src/detect-http-raw-header.c index 1d695b362d..34e7b13948 100644 --- a/src/detect-http-raw-header.c +++ b/src/detect-http-raw-header.c @@ -314,7 +314,7 @@ static int DetectHttpRawHeaderTest06(void) "This is dummy message body\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -378,7 +378,7 @@ static int DetectHttpRawHeaderTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -418,7 +418,7 @@ static int DetectHttpRawHeaderTest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -505,7 +505,7 @@ static int DetectHttpRawHeaderTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -545,7 +545,7 @@ static int DetectHttpRawHeaderTest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -632,7 +632,7 @@ static int DetectHttpRawHeaderTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -673,7 +673,7 @@ static int DetectHttpRawHeaderTest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -760,7 +760,7 @@ static int DetectHttpRawHeaderTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -801,7 +801,7 @@ static int DetectHttpRawHeaderTest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -888,7 +888,7 @@ static int DetectHttpRawHeaderTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -926,7 +926,7 @@ static int DetectHttpRawHeaderTest11(void) "This is dummy message body\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -990,7 +990,7 @@ static int DetectHttpRawHeaderTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1027,7 +1027,7 @@ static int DetectHttpRawHeaderTest12(void) "This is dummy message body\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1091,7 +1091,7 @@ static int DetectHttpRawHeaderTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1128,7 +1128,7 @@ static int DetectHttpRawHeaderTest13(void) "longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1194,7 +1194,7 @@ static int DetectHttpRawHeaderTest13(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) diff --git a/src/detect-http-server-body.c b/src/detect-http-server-body.c index 67e6a4f9ae..a516f04206 100644 --- a/src/detect-http-server-body.c +++ b/src/detect-http-server-body.c @@ -328,7 +328,7 @@ static int DetectHttpServerBodyTest06(void) "message"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -400,7 +400,7 @@ static int DetectHttpServerBodyTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -445,7 +445,7 @@ static int DetectHttpServerBodyTest07(void) "message"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -537,7 +537,7 @@ static int DetectHttpServerBodyTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -583,7 +583,7 @@ static int DetectHttpServerBodyTest08(void) "sage4u!!"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -681,7 +681,7 @@ static int DetectHttpServerBodyTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -730,7 +730,7 @@ static int DetectHttpServerBodyTest09(void) "e4u!!"; uint32_t http_len4 = sizeof(http_buf4) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -836,7 +836,7 @@ static int DetectHttpServerBodyTest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -885,7 +885,7 @@ static int DetectHttpServerBodyTest10(void) "e4u!!"; uint32_t http_len4 = sizeof(http_buf4) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -991,7 +991,7 @@ static int DetectHttpServerBodyTest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1036,7 +1036,7 @@ static int DetectHttpServerBodyTest11(void) "bigmessage4u!!"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1134,7 +1134,7 @@ static int DetectHttpServerBodyTest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1179,7 +1179,7 @@ static int DetectHttpServerBodyTest12(void) "bigmessage4u!!"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1277,7 +1277,7 @@ static int DetectHttpServerBodyTest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1315,7 +1315,7 @@ static int DetectHttpServerBodyTest13(void) "longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1387,7 +1387,7 @@ static int DetectHttpServerBodyTest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1434,7 +1434,7 @@ static int DetectHttpServerBodyTest14(void) { "\r\n" "two"; uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1554,7 +1554,7 @@ static int DetectHttpServerBodyTest14(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -1601,7 +1601,7 @@ static int DetectHttpServerBodyTest15(void) { "\r\n" "two"; uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1713,7 +1713,7 @@ static int DetectHttpServerBodyTest15(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2426,7 +2426,7 @@ static int DetectHttpServerBodyFileDataTest01(void) "message"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2498,7 +2498,7 @@ static int DetectHttpServerBodyFileDataTest01(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2543,7 +2543,7 @@ static int DetectHttpServerBodyFileDataTest02(void) "message"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2637,7 +2637,7 @@ static int DetectHttpServerBodyFileDataTest02(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2683,7 +2683,7 @@ static int DetectHttpServerBodyFileDataTest03(void) "sage4u!!"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2782,7 +2782,7 @@ static int DetectHttpServerBodyFileDataTest03(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2831,7 +2831,7 @@ static int DetectHttpServerBodyFileDataTest04(void) "e4u!!"; uint32_t http_len4 = sizeof(http_buf4) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2937,7 +2937,7 @@ static int DetectHttpServerBodyFileDataTest04(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -2986,7 +2986,7 @@ static int DetectHttpServerBodyFileDataTest05(void) "e4u!!"; uint32_t http_len4 = sizeof(http_buf4) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3092,7 +3092,7 @@ static int DetectHttpServerBodyFileDataTest05(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3137,7 +3137,7 @@ static int DetectHttpServerBodyFileDataTest06(void) "bigmessage4u!!"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3235,7 +3235,7 @@ static int DetectHttpServerBodyFileDataTest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3280,7 +3280,7 @@ static int DetectHttpServerBodyFileDataTest07(void) "bigmessage4u!!"; uint32_t http_len3 = sizeof(http_buf3) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3378,7 +3378,7 @@ static int DetectHttpServerBodyFileDataTest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3416,7 +3416,7 @@ static int DetectHttpServerBodyFileDataTest08(void) "longbufferabcdefghijklmnopqrstuvwxyz0123456789bufferend"; uint32_t http_len2 = sizeof(http_buf2) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3488,7 +3488,7 @@ static int DetectHttpServerBodyFileDataTest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -3535,7 +3535,7 @@ static int DetectHttpServerBodyFileDataTest09(void) { "\r\n" "two"; uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3643,7 +3643,7 @@ static int DetectHttpServerBodyFileDataTest09(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -3690,7 +3690,7 @@ static int DetectHttpServerBodyFileDataTest10(void) { "\r\n" "two"; uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3798,7 +3798,7 @@ static int DetectHttpServerBodyFileDataTest10(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } diff --git a/src/detect-http-stat-code.c b/src/detect-http-stat-code.c index 3ad2682c35..0d68e22337 100644 --- a/src/detect-http-stat-code.c +++ b/src/detect-http-stat-code.c @@ -227,7 +227,7 @@ static int DetectHttpStatCodeSigTest01(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -299,7 +299,7 @@ static int DetectHttpStatCodeSigTest01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -328,7 +328,7 @@ static int DetectHttpStatCodeSigTest02(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -413,7 +413,7 @@ static int DetectHttpStatCodeSigTest02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -443,7 +443,7 @@ static int DetectHttpStatCodeSigTest03(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -528,7 +528,7 @@ static int DetectHttpStatCodeSigTest03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -558,7 +558,7 @@ static int DetectHttpStatCodeSigTest04(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -643,7 +643,7 @@ static int DetectHttpStatCodeSigTest04(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } diff --git a/src/detect-http-stat-msg.c b/src/detect-http-stat-msg.c index c503878180..dc77ff8d19 100644 --- a/src/detect-http-stat-msg.c +++ b/src/detect-http-stat-msg.c @@ -219,7 +219,7 @@ static int DetectHttpStatMsgSigTest01(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -304,7 +304,7 @@ static int DetectHttpStatMsgSigTest01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -333,7 +333,7 @@ static int DetectHttpStatMsgSigTest02(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -407,7 +407,7 @@ static int DetectHttpStatMsgSigTest02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -437,7 +437,7 @@ static int DetectHttpStatMsgSigTest03(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -522,7 +522,7 @@ static int DetectHttpStatMsgSigTest03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } diff --git a/src/detect-http-ua.c b/src/detect-http-ua.c index 8124474408..5393c36520 100644 --- a/src/detect-http-ua.c +++ b/src/detect-http-ua.c @@ -293,7 +293,7 @@ static int DetectHttpUATest06(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -358,7 +358,7 @@ static int DetectHttpUATest06(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -395,7 +395,7 @@ static int DetectHttpUATest07(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -480,7 +480,7 @@ static int DetectHttpUATest07(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -518,7 +518,7 @@ static int DetectHttpUATest08(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -606,7 +606,7 @@ static int DetectHttpUATest08(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -648,7 +648,7 @@ static int DetectHttpUATest09(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -736,7 +736,7 @@ static int DetectHttpUATest09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -778,7 +778,7 @@ static int DetectHttpUATest10(void) uint32_t http1_len = sizeof(http1_buf) - 1; uint32_t http2_len = sizeof(http2_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -866,7 +866,7 @@ static int DetectHttpUATest10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -902,7 +902,7 @@ static int DetectHttpUATest11(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -967,7 +967,7 @@ static int DetectHttpUATest11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1001,7 +1001,7 @@ static int DetectHttpUATest12(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1066,7 +1066,7 @@ static int DetectHttpUATest12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1101,7 +1101,7 @@ static int DetectHttpUATest13(void) "\r\n"; uint32_t http_len = sizeof(http_buf) - 1; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1166,7 +1166,7 @@ static int DetectHttpUATest13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) @@ -1204,7 +1204,7 @@ static int DetectHttpUATest14(void) uint32_t httplen4 = sizeof(httpbuf4) - 1; /* minus the \0 */ uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1365,7 +1365,7 @@ static int DetectHttpUATest14(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } diff --git a/src/detect-luajit.c b/src/detect-luajit.c index 13aaf824dd..4cb133a9ef 100644 --- a/src/detect-luajit.c +++ b/src/detect-luajit.c @@ -979,7 +979,7 @@ static int LuajitMatchTest01(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); ut_script = script; @@ -1083,7 +1083,7 @@ static int LuajitMatchTest01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1409,7 +1409,7 @@ static int LuajitMatchTest04(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); ut_script = script; @@ -1507,7 +1507,7 @@ static int LuajitMatchTest04(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1556,7 +1556,7 @@ static int LuajitMatchTest05(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); ut_script = script; @@ -1654,7 +1654,7 @@ static int LuajitMatchTest05(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1708,7 +1708,7 @@ static int LuajitMatchTest06(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); ut_script = script; @@ -1806,7 +1806,7 @@ static int LuajitMatchTest06(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); diff --git a/src/detect-pcre.c b/src/detect-pcre.c index 9a77c0e70e..907f664afe 100644 --- a/src/detect-pcre.c +++ b/src/detect-pcre.c @@ -1656,7 +1656,7 @@ static int DetectPcreTestSig01Real(int mpm_type) DetectEngineThreadCtx *det_ctx = NULL; int result = 0; Flow f; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&th_v, 0, sizeof(th_v)); @@ -1709,7 +1709,7 @@ static int DetectPcreTestSig01Real(int mpm_type) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -1916,7 +1916,7 @@ static int DetectPcreModifPTest04(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1992,7 +1992,7 @@ static int DetectPcreModifPTest04(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2046,7 +2046,7 @@ static int DetectPcreModifPTest05(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -2153,7 +2153,7 @@ static int DetectPcreModifPTest05(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2244,7 +2244,7 @@ static int DetectPcreTestSig09(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2310,7 +2310,7 @@ static int DetectPcreTestSig09(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2340,7 +2340,7 @@ static int DetectPcreTestSig10(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2406,7 +2406,7 @@ static int DetectPcreTestSig10(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2436,7 +2436,7 @@ static int DetectPcreTestSig11(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2502,7 +2502,7 @@ static int DetectPcreTestSig11(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2532,7 +2532,7 @@ static int DetectPcreTestSig12(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2598,7 +2598,7 @@ static int DetectPcreTestSig12(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2628,7 +2628,7 @@ static int DetectPcreTestSig13(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2694,7 +2694,7 @@ static int DetectPcreTestSig13(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2724,7 +2724,7 @@ static int DetectPcreTestSig14(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2790,7 +2790,7 @@ static int DetectPcreTestSig14(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2820,7 +2820,7 @@ static int DetectPcreTestSig15(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2887,7 +2887,7 @@ static int DetectPcreTestSig15(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -2917,7 +2917,7 @@ static int DetectPcreTestSig16(void) ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -2984,7 +2984,7 @@ static int DetectPcreTestSig16(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -3020,7 +3020,7 @@ static int DetectPcreTxBodyChunksTest01(void) uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ uint32_t httplen7 = sizeof(httpbuf7) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -3139,7 +3139,7 @@ static int DetectPcreTxBodyChunksTest01(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SCMutexUnlock(&f.m); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); @@ -3171,7 +3171,7 @@ static int DetectPcreTxBodyChunksTest02(void) uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ uint32_t httplen7 = sizeof(httpbuf7) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3380,7 +3380,7 @@ static int DetectPcreTxBodyChunksTest02(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -3419,7 +3419,7 @@ static int DetectPcreTxBodyChunksTest03(void) uint32_t httplen5 = sizeof(httpbuf5) - 1; /* minus the \0 */ uint32_t httplen6 = sizeof(httpbuf6) - 1; /* minus the \0 */ uint32_t httplen7 = sizeof(httpbuf7) - 1; /* minus the \0 */ - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3598,7 +3598,7 @@ static int DetectPcreTxBodyChunksTest03(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } @@ -3641,7 +3641,7 @@ static int DetectPcreFlowvarCapture01(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3729,7 +3729,7 @@ static int DetectPcreFlowvarCapture01(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3767,7 +3767,7 @@ static int DetectPcreFlowvarCapture02(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -3878,7 +3878,7 @@ static int DetectPcreFlowvarCapture02(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3913,7 +3913,7 @@ static int DetectPcreFlowvarCapture03(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -4006,7 +4006,7 @@ static int DetectPcreFlowvarCapture03(void) result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); diff --git a/src/detect-ssl-state.c b/src/detect-ssl-state.c index da2ffab6c0..9fe5cf0e78 100644 --- a/src/detect-ssl-state.c +++ b/src/detect-ssl-state.c @@ -700,7 +700,7 @@ static int DetectSslStateTest07(void) DetectEngineCtx *de_ctx = NULL; SSLState *ssl_state = NULL; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&p, 0, sizeof(p)); @@ -884,7 +884,7 @@ static int DetectSslStateTest07(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-ssl-version.c b/src/detect-ssl-version.c index 012e73bbb9..085c369286 100644 --- a/src/detect-ssl-version.c +++ b/src/detect-ssl-version.c @@ -420,7 +420,7 @@ static int DetectSslVersionTestDetect01(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -514,7 +514,7 @@ static int DetectSslVersionTestDetect01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -545,7 +545,7 @@ static int DetectSslVersionTestDetect02(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -637,7 +637,7 @@ static int DetectSslVersionTestDetect02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); @@ -666,7 +666,7 @@ static int DetectSslVersionTestDetect03(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -771,7 +771,7 @@ static int DetectSslVersionTestDetect03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-tls-version.c b/src/detect-tls-version.c index 16db5463d8..e27fcfb45c 100644 --- a/src/detect-tls-version.c +++ b/src/detect-tls-version.c @@ -328,7 +328,7 @@ static int DetectTlsVersionTestDetect01(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -425,7 +425,7 @@ static int DetectTlsVersionTestDetect01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -455,7 +455,7 @@ static int DetectTlsVersionTestDetect02(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -548,7 +548,7 @@ static int DetectTlsVersionTestDetect02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); @@ -579,7 +579,7 @@ static int DetectTlsVersionTestDetect03(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -685,7 +685,7 @@ static int DetectTlsVersionTestDetect03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) { SigGroupCleanup(de_ctx); SigCleanSignatures(de_ctx); diff --git a/src/detect-uricontent.c b/src/detect-uricontent.c index 627389b891..bca0c54f56 100644 --- a/src/detect-uricontent.c +++ b/src/detect-uricontent.c @@ -282,7 +282,7 @@ static int HTTPUriTest01(void) { uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -330,7 +330,7 @@ static int HTTPUriTest01(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); SCMutexUnlock(&f.m); FLOW_DESTROY(&f); @@ -348,7 +348,7 @@ static int HTTPUriTest02(void) { uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -397,7 +397,7 @@ static int HTTPUriTest02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -417,7 +417,7 @@ static int HTTPUriTest03(void) { uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -466,7 +466,7 @@ static int HTTPUriTest03(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -487,7 +487,7 @@ static int HTTPUriTest04(void) { uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */ TcpSession ssn; int r = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -536,7 +536,7 @@ static int HTTPUriTest04(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); StreamTcpFreeConfig(TRUE); if (htp_state != NULL) HTPStateFree(htp_state); @@ -604,7 +604,7 @@ static int DetectUriSigTest02(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; HtpState *http_state = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -689,7 +689,7 @@ static int DetectUriSigTest02(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); //if (http_state != NULL) HTPStateFree(http_state); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); @@ -719,7 +719,7 @@ static int DetectUriSigTest03(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -829,7 +829,7 @@ static int DetectUriSigTest03(void) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&th_v, det_ctx); @@ -1058,7 +1058,7 @@ static int DetectUriSigTest05(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1155,7 +1155,7 @@ static int DetectUriSigTest05(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&th_v, det_ctx); @@ -1185,7 +1185,7 @@ static int DetectUriSigTest06(void) { ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; TCPHdr tcp_hdr; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1295,7 +1295,7 @@ static int DetectUriSigTest06(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&th_v, det_ctx); @@ -1322,7 +1322,7 @@ static int DetectUriSigTest07(void) { Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -1417,7 +1417,7 @@ static int DetectUriSigTest07(void) { result = 1; end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&th_v, det_ctx); diff --git a/src/detect-urilen.c b/src/detect-urilen.c index c6c315ee63..09cdcd113a 100644 --- a/src/detect-urilen.c +++ b/src/detect-urilen.c @@ -587,7 +587,7 @@ static int DetectUrilenSigTest01(void) Signature *s = NULL; ThreadVars th_v; DetectEngineThreadCtx *det_ctx; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -664,7 +664,7 @@ static int DetectUrilenSigTest01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (de_ctx != NULL) SigGroupCleanup(de_ctx); if (de_ctx != NULL) SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); diff --git a/src/detect.c b/src/detect.c index e8b9d28476..ee5226fa0f 100644 --- a/src/detect.c +++ b/src/detect.c @@ -5124,7 +5124,7 @@ static int SigTest06Real (int mpm_type) { Flow f; TcpSession ssn; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -5192,7 +5192,7 @@ static int SigTest06Real (int mpm_type) { DetectEngineCtxFree(de_ctx); end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreePackets(&p, 1); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); @@ -5224,7 +5224,7 @@ static int SigTest07Real (int mpm_type) { Flow f; TcpSession ssn; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -5284,7 +5284,7 @@ static int SigTest07Real (int mpm_type) { end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); SCMutexUnlock(&f.m); UTHFreePackets(&p, 1); StreamTcpFreeConfig(TRUE); @@ -5325,7 +5325,7 @@ static int SigTest08Real (int mpm_type) { Flow f; TcpSession ssn; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&f, 0, sizeof(Flow)); memset(&th_v, 0, sizeof(th_v)); @@ -5394,7 +5394,7 @@ end: DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); DetectEngineCtxFree(de_ctx); if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreePackets(&p, 1); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); @@ -5425,7 +5425,7 @@ static int SigTest09Real (int mpm_type) { DetectEngineThreadCtx *det_ctx = NULL; Flow f; TcpSession ssn; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); int result = 0; memset(&th_v, 0, sizeof(th_v)); @@ -5492,7 +5492,7 @@ end: DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); DetectEngineCtxFree(de_ctx); if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreePackets(&p, 1); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); @@ -5519,7 +5519,7 @@ static int SigTest10Real (int mpm_type) { Flow f; TcpSession ssn; int result = 0; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); @@ -5586,7 +5586,7 @@ static int SigTest10Real (int mpm_type) { DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); DetectEngineCtxFree(de_ctx); if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); UTHFreePackets(&p, 1); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); @@ -10754,7 +10754,7 @@ static int SigTestDropFlow01(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -10826,7 +10826,7 @@ static int SigTestDropFlow01(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -10857,7 +10857,7 @@ static int SigTestDropFlow02(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -10930,7 +10930,7 @@ static int SigTestDropFlow02(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -10972,7 +10972,7 @@ static int SigTestDropFlow03(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -11102,7 +11102,7 @@ static int SigTestDropFlow03(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL) @@ -11145,7 +11145,7 @@ static int SigTestDropFlow04(void) Signature *s = NULL; ThreadVars tv; DetectEngineThreadCtx *det_ctx = NULL; - void *alp_tctx = AppLayerParserGetCtxThread(); + void *alp_tctx = AppLayerParserThreadCtxAlloc(); memset(&tv, 0, sizeof(ThreadVars)); memset(&f, 0, sizeof(Flow)); @@ -11286,7 +11286,7 @@ static int SigTestDropFlow04(void) end: if (alp_tctx != NULL) - AppLayerParserDestroyCtxThread(alp_tctx); + AppLayerParserThreadCtxFree(alp_tctx); if (det_ctx != NULL) DetectEngineThreadCtxDeinit(&tv, det_ctx); if (de_ctx != NULL)