StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_START, dcerpcrequest, requestlen);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCUDPState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_START, dcerpcbind, bindlen);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpcbindack, bindacklen);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (dcerpc_state->dcerpc.dcerpchdr.type != BIND_ACK) {
printf("expected dcerpc type 0x%02x , got 0x%02x : ", BIND_ACK, dcerpc_state->dcerpc.dcerpchdr.type);
result = 0;
printUUID("BIND_ACK", uuid_entry);
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_EOF, dcerpcrequest, requestlen);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (dcerpc_state->dcerpc.dcerpchdr.type != REQUEST) {
printf("expected dcerpc type 0x%02x , got 0x%02x : ", REQUEST, dcerpc_state->dcerpc.dcerpchdr.type);
result = 0;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_START, dcerpcrequest, requestlen);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_START, dcerpcrequest, requestlen);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
bind1, bind1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
m++;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind2, bind2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
item = NULL;
m = 0;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_START,
bind1, bind1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
result &= (dcerpc_state->dcerpc.dcerpcbindbindack.numctxitems == 16);
result &= (dcerpc_state->dcerpc.dcerpcbindbindack.numctxitemsleft == 8);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind2, bind2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 0);
result &= (dcerpc_state->dcerpc.dcerpcbindbindack.ctxbytesprocessed == 0);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_START,
request1, request1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer_len == 12);
result &= (dcerpc_state->dcerpc.pdu_fragged = 1);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 38);
result &= (dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer != NULL &&
dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer_len == 14);
result &= (dcerpc_state->dcerpc.pdu_fragged = 1);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request3, request3_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 0);
result &= (dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer != NULL &&
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
request, request_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
request, request_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER|STREAM_START,
fault, fault_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 2);
result &= (dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer == NULL);
result &= (dcerpc_state->dcerpc.pdu_fragged == 1);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 0);
result &= (dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer != NULL &&
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer_len == 12);
result &= (dcerpc_state->dcerpc.pdu_fragged == 0);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 2);
result &= (dcerpc_state->dcerpc.pdu_fragged == 1);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request3, request3_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 0);
result &= (dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer != NULL &&
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
bind_ack1, bind_ack1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
result &= (dcerpc_state->dcerpc.bytesprocessed == 24);
result &= (dcerpc_state->dcerpc.pdu_fragged == 1);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
bind_ack2, bind_ack2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 0);
result &= (dcerpc_state->dcerpc.pdu_fragged == 0);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind, bind_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind, bind_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
bind_ack, bind_ack_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind1, bind1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
bind_ack1, bind_ack1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind2, bind2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
bind_ack2, bind_ack2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind3, bind3_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
bind_ack3, bind_ack3_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
bind, bind_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
bind_ack, bind_ack_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
alter_context, alter_context_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
alter_context_resp, alter_context_resp_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
count = 0;
TAILQ_FOREACH(item, &dcerpc_state->dcerpc.dcerpcbindbindack.accepted_uuid_list, next) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
result &= (dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer == NULL);
result &= (dcerpc_state->dcerpc.pdu_fragged == 1);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result &= (dcerpc_state->dcerpc.bytesprocessed == 0);
result &= (dcerpc_state->dcerpc.dcerpcrequest.stub_data_buffer != NULL &&
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START, dcerpcbind, bindlen);
if (r != 0) {
printf("dcerpc header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
DCERPCState *dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpcbindack, bindacklen);
if (r == 0) {
printf("dce parser didn't return fail\n");
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result = 1;
end:
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_FTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER|STREAM_EOF, ftpbuf, ftplen);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FtpState *ftp_state = f.alstate;
if (ftp_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER|STREAM_START, ftpbuf1, ftplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER, ftpbuf2, ftplen2);
if (r != 0) {
SCLogDebug("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER|STREAM_EOF, ftpbuf3, ftplen3);
if (r != 0) {
SCLogDebug("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FtpState *ftp_state = f.alstate;
if (ftp_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, ftpbuf1, ftplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FtpState *ftp_state = f.alstate;
if (ftp_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER|STREAM_START, ftpbuf1, ftplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER|STREAM_EOF, ftpbuf2, ftplen2);
if (r != 0) {
SCLogDebug("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FtpState *ftp_state = f.alstate;
if (ftp_state == NULL) {
else if (u == (ftplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, flags, &ftpbuf1[u], 1);
if (r != 0) {
SCLogDebug("toserver chunk %" PRIu32 " returned %" PRId32 ", expected 0: ", u, r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
}
FtpState *ftp_state = f.alstate;
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 3 size %u <<<<\n", httplen3);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 4 size %u <<<<\n", httplen4);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 3 size %u <<<<\n", httplen3);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 4 size %u <<<<\n", httplen4);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 5 size %u <<<<\n", httplen5);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 6 size %u <<<<\n", httplen6);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 3 size %u <<<<\n", httplen3);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 4 size %u <<<<\n", httplen4);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 5 size %u <<<<\n", httplen5);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 6 size %u <<<<\n", httplen6);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 size %u <<<<\n", httplen1);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 size %u <<<<\n", httplen1);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 size %u <<<<\n", httplen1);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
if (decoder_events == NULL) {
printf("no app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
if (decoder_events->cnt != 2) {
printf("expected 2 events: ");
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 3 size %u <<<<\n", httplen3);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 4 size %u <<<<\n", httplen4);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
if (decoder_events == NULL) {
printf("no app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
if (decoder_events->cnt != 1) {
printf("expected 1 event: ");
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 3 size %u <<<<\n", httplen3);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 4 size %u <<<<\n", httplen4);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
if (decoder_events != NULL) {
printf("app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
result = 1;
end:
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 3 size %u <<<<\n", httplen3);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 4 size %u <<<<\n", httplen4);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
if (decoder_events != NULL) {
printf("app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
htp_tx_t *tx = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP, http_state, 0);
if (tx == NULL) {
else
flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else
flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|
STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
if (htp_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|
STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
htp_state = f->alstate;
if (htp_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START,
httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOCLIENT, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen6);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START,
httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen2);
if (r != 0) {
printf("toclient chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
else
flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
uint8_t flags = 0;
flags = STREAM_TOSERVER|STREAM_START|STREAM_EOF;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk returned %" PRId32 ", expected"
" 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
htp_state = f->alstate;
if (htp_state == NULL) {
uint8_t flags = 0;
flags = STREAM_TOSERVER|STREAM_START|STREAM_EOF;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk returned %" PRId32 ", expected"
" 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
htp_state = f->alstate;
if (htp_state == NULL) {
else
flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else
flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else
flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else
flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
else if (u == (httplen1 - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, &httpbuf1[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SCLogDebug("\n>>>> processing chunk 1 again <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetDecoderEvents(f->alparser);
if (decoder_events != NULL) {
printf("app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
result = 1;
end:
if (alp_tctx != NULL)
else if (u == (len - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, (uint8_t *)&httpbuf[u], 1);
if (u < 18294) { /* first 18294 bytes should result in 0 */
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
} else if (u == 18294UL) { /* byte 18294 should result in error */
if (r != -1) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" -1: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
/* break out, htp state is in error state now */
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
break;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
if (htp_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
if (decoder_events == NULL) {
printf("no app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
if (decoder_events->events[0] != HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG) {
printf("HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG not set: ");
else if (u == (len - 1)) flags = STREAM_TOSERVER|STREAM_EOF;
else flags = STREAM_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, (uint8_t *)&httpbuf[u], 1);
if (r != 0) {
printf("toserver chunk %" PRIu32 " returned %" PRId32 ", expected"
" 0: ", u, r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
}
htp_state = f->alstate;
if (htp_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
if (decoder_events != NULL) {
printf("app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
result = 1;
end:
uint8_t flags = STREAM_TOSERVER|STREAM_START|STREAM_EOF;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, flags, (uint8_t *)httpbuf, len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
htp_state = f->alstate;
if (htp_state == NULL) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
if (decoder_events == NULL) {
printf("no app events: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
if (decoder_events->events[0] != HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT) {
printf("HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT not set: ");
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START,
httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER,
httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START,
httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER,
httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER,
httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen5);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START,
httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER,
httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
http_state = f->alstate;
if (http_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readCoilsReq, sizeof(readCoilsReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
readCoilsRsp, sizeof(readCoilsRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
writeMultipleRegistersReq, sizeof(writeMultipleRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
writeMultipleRegistersRsp, sizeof(writeMultipleRegistersRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readWriteMultipleRegistersReq, sizeof(readWriteMultipleRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
readWriteMultipleRegistersRsp, sizeof(readWriteMultipleRegistersRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
forceListenOnlyMode, sizeof(forceListenOnlyMode));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
invalidProtocolIdReq, sizeof(invalidProtocolIdReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
readCoilsRsp, sizeof(readCoilsRsp));
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
invalidLengthWriteMultipleRegistersReq,
sizeof(invalidLengthWriteMultipleRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readCoilsReq, sizeof(readCoilsReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
readCoilsErrorRsp, sizeof(readCoilsErrorRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
input, input_len - part2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
input, input_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
part2_len = 10;
input = readCoilsRsp;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
input, input_len - part2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
input, input_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
input, input_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
memcpy(input, readCoilsRsp, sizeof(readCoilsRsp));
memcpy(input + sizeof(readCoilsRsp), writeMultipleRegistersRsp, sizeof(writeMultipleRegistersRsp));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
input, sizeof(input_len));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result = 1;
end:
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
exceededLengthWriteMultipleRegistersReq,
sizeof(exceededLengthWriteMultipleRegistersReq) + 65523 /* header.length - 7 */ * sizeof(uint8_t));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
invalidLengthPDUWriteMultipleRegistersReq,
sizeof(invalidLengthPDUWriteMultipleRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
maskWriteRegisterReq, sizeof(maskWriteRegisterReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
maskWriteRegisterRsp, sizeof(maskWriteRegisterRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
writeSingleRegisterReq, sizeof(writeSingleRegisterReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
writeSingleRegisterRsp, sizeof(writeSingleRegisterRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
invalidMaskWriteRegisterReq,
sizeof(invalidMaskWriteRegisterReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
maskWriteRegisterRsp, sizeof(maskWriteRegisterRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
invalidWriteSingleRegisterReq, sizeof(invalidWriteSingleRegisterReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOCLIENT,
writeSingleRegisterRsp, sizeof(writeSingleRegisterRsp));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (modbus_state->transaction_max !=1) {
printf("expected transaction_max %" PRIu8 ", got %" PRIu64 ": ", 1, modbus_state->transaction_max);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_TEST, STREAM_TOSERVER|STREAM_EOF,
testbuf, testlen);
if (r != -1) {
printf("returned %" PRId32 ", expected -1: ", r);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
if (!(ssn.flags & STREAMTCP_FLAG_APP_LAYER_DISABLED)) {
printf("flag should have been set, but is not: ");
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_TEST, STREAM_TOSERVER|STREAM_EOF, testbuf,
testlen);
if (r != -1) {
printf("returned %" PRId32 ", expected -1: \n", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
end:
AppLayerParserRestoreParserTable();
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER|STREAM_EOF, smbbuf, smblen);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER|STREAM_EOF, smbbuf, smblen);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER|STREAM_START, smbbuf1, smblen1);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER, smbbuf2, smblen2);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER, smbbuf3, smblen3);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
printUUID("BIND", smb_state->dcerpc.dcerpcbindbindack.uuid_entry);
result = 1;
end:
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER|STREAM_START, smbbuf1, smblen1);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER, smbbuf2, smblen2);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER, smbbuf3, smblen3);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER, smbbuf4, smblen4);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result = 1;
end:
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOCLIENT | STREAM_START, smbbuf1, smblen1);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOCLIENT | STREAM_START, smbbuf1, smblen1);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOCLIENT, smbbuf2, smblen2);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smb_state->smb.command != SMB_COM_NEGOTIATE) {
printf("we should expect SMB command 0x%02x , got 0x%02x : ",
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER | STREAM_START, smbbuf1, smblen1);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER, smbbuf2, smblen2);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smb_state->smb.command != SMB_COM_NEGOTIATE) {
printf("we should expect SMB command 0x%02x , got 0x%02x : ",
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOSERVER | STREAM_START, smbbuf1, smblen1);
if (r != 0) {
printf("smb header check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMBState *smb_state = f.alstate;
if (smb_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB, STREAM_TOCLIENT, smbbuf2, smblen2);
if (r == 0) {
printf("smb parser didn't return fail\n");
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result = 1;
end:
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMB2, STREAM_TOSERVER|STREAM_EOF, smb2buf, smb2len);
if (r != 0) {
printf("smb2 header check returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMB2State *smb2_state = f.alstate;
if (smb2_state == NULL) {
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
welcome_reply, welcome_reply_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply1, reply1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply2, reply2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
welcome_reply, welcome_reply_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply1, reply1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply2, reply2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request3, request3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply3, reply3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request4, request4_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply4, reply4_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request5_1, request5_1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request5_2, request5_2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request5_3, request5_3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request5_4, request5_4_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request5_5, request5_5_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply5, reply5_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request6, request6_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply6, reply6_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request7, request7_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply7, reply7_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request8, request8_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply8, reply8_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request9_1, request9_1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request9_2, request9_2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request9_3, request9_3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request9_4, request9_4_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request9_5, request9_5_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply9, reply9_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request10, request10_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply10, reply10_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
welcome_reply, welcome_reply_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply1, reply1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 3 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply2, reply2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
welcome_reply, welcome_reply_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
welcome_reply, welcome_reply_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply1, reply1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply2, reply2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request3, request3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply3, reply3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
welcome_reply, welcome_reply_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply1, reply1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply2, reply2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request3, request3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply3, reply3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request4, request4_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request5, request5_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request6, request6_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_1, request1_1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_2, request1_2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 1 ||
smtp_state->ts_db == NULL ||
smtp_state->ts_db_len != (int32_t)strlen(request1_str) ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 0 ||
smtp_state->ts_db != NULL ||
smtp_state->ts_db_len != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_1, request1_1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_2, request1_2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 1 ||
smtp_state->ts_db == NULL ||
smtp_state->ts_db_len != (int32_t)strlen(request1_str) ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 0 ||
smtp_state->ts_db != NULL ||
smtp_state->ts_db_len != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_1, request1_1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_2, request1_2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 1 ||
smtp_state->ts_db == NULL ||
smtp_state->ts_db_len != (int32_t)strlen(request1_str) ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 0 ||
smtp_state->ts_db != NULL ||
smtp_state->ts_db_len != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_1, request1_1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1_2, request1_2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 1 ||
smtp_state->ts_db == NULL ||
smtp_state->ts_db_len != (int32_t)strlen(request1_str) ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 0 ||
smtp_state->ts_db != NULL ||
smtp_state->ts_db_len != 0 ||
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->ts_current_line_db != 0 ||
smtp_state->ts_db != NULL ||
smtp_state->ts_db_len != 0 ||
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER | STREAM_START,
request1, request1_len);
if (r != 0) {
printf("AppLayerParse for smtp failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
smtp_state = f.alstate;
if (smtp_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT | STREAM_TOCLIENT,
reply1, reply1_len);
if (r == 0) {
printf("AppLayerParse for smtp failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER | STREAM_START,
request1, request1_len);
if (r != 0) {
printf("AppLayerParse for smtp failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
smtp_state = f.alstate;
if (smtp_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply1, reply1_len);
if (r != 0) {
printf("AppLayerParse for smtp failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("AppLayerParse for smtp failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
StreamTcpInitConfig(TRUE);
SMTPTestInitConfig();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* Welcome reply */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
welcome_reply, welcome_reply_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SMTPState *smtp_state = f.alstate;
if (smtp_state == NULL) {
printf("no smtp state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request1, request1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* EHLO Reply */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply1, reply1_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if ((smtp_state->helo_len != 7) || strncmp("boo.com", (char *)smtp_state->helo, 7)) {
printf("incorrect parsing of HELO field '%s' (%d)\n", smtp_state->helo, smtp_state->helo_len);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* MAIL FROM Request */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request2, request2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* MAIL FROM Reply */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply2, reply2_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
printf("incorrect parsing of MAIL FROM field '%s' (%d)\n",
smtp_state->curr_tx->mail_from,
smtp_state->curr_tx->mail_from_len);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* RCPT TO Request */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request3, request3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* RCPT TO Reply */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply3, reply3_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
smtp_config.mime_config.decode_quoted_printable = 1;
MimeDecSetConfig(&smtp_config.mime_config);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* DATA request */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request4, request4_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* Data reply */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply4, reply4_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* DATA message */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request4_msg, request4_msg_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* DATA . request */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request4_end, request4_end_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
}
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* DATA . reply */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply4_end, reply4_end_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* QUIT Request */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER,
request5, request5_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 1 ||
smtp_state->cmds_idx != 0 ||
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* QUIT Reply */
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOCLIENT,
reply5, reply5_len);
if (r != 0) {
printf("smtp check returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||
smtp_state->cmds_idx != 0 ||
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER|STREAM_EOF, sshbuf, sshlen);
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER|STREAM_EOF, sshbuf, sshlen);
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER|STREAM_EOF, sshbuf, sshlen);
if (r == 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected != 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT|STREAM_EOF, sshbuf, sshlen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT|STREAM_EOF, sshbuf, sshlen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT|STREAM_EOF, sshbuf, sshlen);
if (r == 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected != 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* Ok, it returned an error. Let's make sure we didn't parse the string at all */
SshState *ssh_state = f.alstate;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
for (u = 0; u < sshlen2; u++) {
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, &sshbuf2[u], 1);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
}
for (u = 0; u < sshlen3; u++) {
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, &sshbuf3[u], 1);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
}
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf5, sshlen5);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
- SCMutexLock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf5, sshlen5);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, server1, serverlen1);
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, server2, serverlen2);
if (r != 0) {
printf("toclient chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCLogDebug("chunk 4:");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCLogDebug("chunk 4:");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
#if 0
SCLogDebug("chunk 4:");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOCLIENT, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
#endif
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER|STREAM_EOF, sshbuf, sshlen);
if (r == 0) {
printf("toclient chunk 1 returned 0 expected non null: ");
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
result = 1;
end:
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER|STREAM_EOF, sshbuf, sshlen);
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER | STREAM_EOF, tlsbuf, tlslen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf2, tlslen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf2, tlslen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf3, tlslen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf2, tlslen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf3, tlslen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf4, tlslen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf, tlslen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf3, buf3_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf3, buf3_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf4, buf4_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r == 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
end:
if (alp_tctx != NULL)
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r == 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
end:
if (alp_tctx != NULL)
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r == 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
end:
if (alp_tctx != NULL)
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r == 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
end:
if (alp_tctx != NULL)
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER | STREAM_EOF, buf,
buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *app_state = f.alstate;
if (app_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT | STREAM_EOF, buf,
buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *app_state = f.alstate;
if (app_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER | STREAM_START, chello_buf,
chello_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *app_state = f.alstate;
if (app_state == NULL) {
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT, shello_buf,
shello_buf_len);
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (app_state->server_connp.content_type != SSLV3_HANDSHAKE_PROTOCOL) {
printf("expected content_type %" PRIu8 ", got %" PRIu8 ": ",
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, client_change_cipher_spec_buf,
client_change_cipher_spec_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* with multiple records the client content type hold the type from the last
* record */
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT, server_change_cipher_spec_buf,
server_change_cipher_spec_buf_len);
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* with multiple records the serve content type hold the type from the last
* record */
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, toserver_app_data_buf,
toserver_app_data_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (app_state->client_connp.content_type != SSLV3_APPLICATION_PROTOCOL) {
printf("expected content_type %" PRIu8 ", got %" PRIu8 ": ",
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf1, buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf2, buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, client_hello, client_hello_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT,
server_hello_certificate_done,
server_hello_certificate_done_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
if (ssl_state->client_connp.bytes_processed != 0 ||
ssl_state->client_connp.hs_bytes_processed != 0)
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER,
client_key_exchange_cipher_enc_hs,
client_key_exchange_cipher_enc_hs_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* The reason hs_bytes_processed is 2 is because, the record
* immediately after the client key exchange is 2 bytes long,
SCLogDebug("handling to_server chunk");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_bind, dcerpc_bind_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
SCLogDebug("handling to_client chunk");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_bindack,
dcerpc_bindack_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_request,
dcerpc_request_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_bind, dcerpc_bind_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
if (PacketAlertCheck(p, 1))
goto end;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_bindack,
dcerpc_bindack_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_request,
dcerpc_request_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_bind, dcerpc_bind_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
if (PacketAlertCheck(p, 2))
goto end;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_bindack,
dcerpc_bindack_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, dcerpc_alter_context,
dcerpc_alter_context_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_alter_context_resp,
dcerpc_alter_context_resp_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, dcerpc_request1,
dcerpc_request1_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_response1,
dcerpc_response1_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, dcerpc_request2,
dcerpc_request2_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_bind, dcerpc_bind_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
dcerpc_bindack, dcerpc_bindack_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_EOF,
dcerpc_request, dcerpc_request_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_request, dcerpc_request_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_bind, dcerpc_bind_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
/* do detect */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_bindack,
dcerpc_bindack_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
if (PacketAlertCheck(p, 1))
goto end;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_EOF,
dcerpc_request, dcerpc_request_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOCLIENT;
p->flowflags |= FLOW_PKT_TOSERVER;
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_request, dcerpc_request_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_bind, dcerpc_bind_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOCLIENT;
p->flowflags |= FLOW_PKT_TOSERVER;
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_bindack,
dcerpc_bindack_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
/* request1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, dcerpc_request1,
dcerpc_request1_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOCLIENT;
p->flowflags |= FLOW_PKT_TOSERVER;
goto end;
/* response1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_response1,
dcerpc_response1_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
goto end;
/* request2 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, dcerpc_request2,
dcerpc_request2_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOCLIENT;
p->flowflags |= FLOW_PKT_TOSERVER;
goto end;
/* response2 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT, dcerpc_response2,
dcerpc_response2_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
goto end;
/* request3 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, dcerpc_request3,
dcerpc_request3_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOCLIENT;
p->flowflags |= FLOW_PKT_TOSERVER;
goto end;
/* response3 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT | STREAM_EOF,
dcerpc_response3, dcerpc_response3_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
/* request1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER | STREAM_START,
dcerpc_request1, dcerpc_request1_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dcerpc_state = f.alstate;
if (dcerpc_state == NULL) {
goto end;
/* response1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
dcerpc_response1, dcerpc_response1_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
goto end;
/* request2 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
dcerpc_request2, dcerpc_request2_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOCLIENT;
p->flowflags |= FLOW_PKT_TOSERVER;
goto end;
/* response2 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT,
dcerpc_response2, dcerpc_response2_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
goto end;
/* request3 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER,
dcerpc_request3, dcerpc_request3_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOCLIENT;
p->flowflags |= FLOW_PKT_TOSERVER;
goto end;
/* response3 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOCLIENT | STREAM_EOF,
dcerpc_response3, dcerpc_response3_len);
if (r != 0) {
SCLogDebug("AppLayerParse for dcerpc failed. Returned %" PRId32, r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
p->flowflags &=~ FLOW_PKT_TOSERVER;
p->flowflags |= FLOW_PKT_TOCLIENT;
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf, sizeof(buf));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dns_state = f.alstate;
if (dns_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf1, sizeof(buf1));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dns_state = f.alstate;
if (dns_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOCLIENT, buf2, sizeof(buf2));
if (r != 0) {
printf("toserver client 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p2);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf3, sizeof(buf3));
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p3);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf, sizeof(buf));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dns_state = f.alstate;
if (dns_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf1, sizeof(buf1));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dns_state = f.alstate;
if (dns_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf2, sizeof(buf2));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf1, sizeof(buf1));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dns_state = f.alstate;
if (dns_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf2, sizeof(buf2));
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p2);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOCLIENT, buf3, sizeof(buf3));
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p3);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf4, sizeof(buf4));
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p4);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf, sizeof(buf));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dns_state = f.alstate;
if (dns_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf1, sizeof(buf1));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
dns_state = f.alstate;
if (dns_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOCLIENT, buf2, sizeof(buf2));
if (r != -1) {
printf("toserver client 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p2);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DNS, STREAM_TOSERVER, buf3, sizeof(buf3));
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p3);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
/* request 1 */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_DCERPC, STREAM_TOSERVER, request1, request1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* detection phase */
SigMatchSignatures(&tv, de_ctx, det_ctx, p);
if ( !(PacketAlertCheck(p, 1))) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, mimemsg, mimemsg_len);
if (r != 0) {
printf("AppLayerParse for smtp failed. Returned %d", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
smtp_state = f.alstate;
if (smtp_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = 0;
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER, mimemsg1, mimemsg1_len);
if (r != 0) {
printf("AppLayerParse for smtp failed. Returned %d", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SMTP, STREAM_TOSERVER, mimemsg2, mimemsg2_len);
if (r != 0) {
printf("AppLayerParse for smtp failed. Returned %d", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
smtp_state = f.alstate;
if (smtp_state == NULL) {
p->flowflags |= FLOW_PKT_ESTABLISHED;
p->flags |= PKT_HAS_FLOW|PKT_STREAM_EST;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, b->direction,
(uint8_t *)b->input,
b->input_size ? b->input_size : strlen((const char *)b->input));
if (r != 0) {
printf("toserver chunk %d returned %" PRId32 ", expected 0: ", i+1, r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1,
http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1,
http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1,
http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1,
http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1,
http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
p->payload = http_buf2;
p->payload_len = http_buf2_len;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
p->flowflags |= FLOW_PKT_ESTABLISHED;
p->flags |= PKT_HAS_FLOW|PKT_STREAM_EST;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, b->direction,
(uint8_t *)b->input,
b->input_size ? b->input_size : strlen((const char *)b->input));
if (r != 0) {
printf("toserver chunk %d returned %" PRId32 ", expected 0: ", i+1, r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readWriteMultipleRegistersReq, sizeof(readWriteMultipleRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER, forceListenOnlyMode, sizeof(forceListenOnlyMode));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
encapsulatedInterfaceTransport, sizeof(encapsulatedInterfaceTransport));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER, unassigned, sizeof(unassigned));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readCoilsReq, sizeof(readCoilsReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readInputsRegistersReq, sizeof(readInputsRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER, readCoilsReq, sizeof(readCoilsReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readInputsRegistersReq, sizeof(readInputsRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_MODBUS, STREAM_TOSERVER,
readWriteMultipleRegistersReq, sizeof(readWriteMultipleRegistersReq));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ModbusState *modbus_state = f.alstate;
if (modbus_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 1))) {
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if ((PacketAlertCheck(p, 1)) || (PacketAlertCheck(p, 2))) {
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf7, httplen7);
if (r != 0) {
printf("toserver chunk 7 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (!(PacketAlertCheck(p, 2))) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
FileContainer *files = AppLayerParserGetFiles(p->flow->proto, p->flow->alproto,
p->flow->alstate, STREAM_TOSERVER);
if (files == NULL) {
printf("no stored files: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
File *file = files->head;
if (file == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
FileContainer *files = AppLayerParserGetFiles(p->flow->proto, p->flow->alproto,
p->flow->alstate, STREAM_TOSERVER);
if (files == NULL) {
printf("no stored files: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
File *file = files->head;
if (file == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
FileContainer *files = AppLayerParserGetFiles(p->flow->proto, p->flow->alproto,
p->flow->alstate, STREAM_TOSERVER);
if (files == NULL) {
printf("no stored files: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
File *file = files->head;
if (file == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
FileContainer *files = AppLayerParserGetFiles(p->flow->proto, p->flow->alproto,
p->flow->alstate, STREAM_TOSERVER);
if (files == NULL) {
printf("no stored files: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
File *file = files->head;
if (file == NULL) {
StreamTcpInitConfig(TRUE);
SCLogDebug("\n>>>> processing chunk 1 <<<<\n");
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
int r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
SCLogDebug("\n>>>> processing chunk 2 size %u <<<<\n", httplen2);
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
r = AppLayerParserParse(alp_tctx, f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_EOF, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
goto end;
}
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
FileContainer *files = AppLayerParserGetFiles(p->flow->proto, p->flow->alproto,
p->flow->alstate, STREAM_TOSERVER);
if (files == NULL) {
printf("no stored files: ");
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
goto end;
}
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
File *file = files->head;
if (file == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineStateReset(f.de_state, STREAM_TOSERVER | STREAM_TOCLIENT);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
p->payload = http_buf2;
p->payload_len = http_buf2_len;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_buf_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v,(void *)de_ctx,(void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER, ftpbuf1, ftplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
SCLogDebug("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
SCLogDebug("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
SCLogDebug("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FtpState *ftp_state = f.alstate;
if (ftp_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v,(void *)de_ctx,(void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_FTP, STREAM_TOSERVER, ftpbuf1, ftplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
SCLogDebug("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
SCLogDebug("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
SCLogDebug("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FtpState *ftp_state = f.alstate;
if (ftp_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1)) {
printf("sig 1 alerted (2): ");
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf7, httplen7);
if (r != 0) {
printf("toserver chunk 7 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf7, httplen7);
if (r != 0) {
printf("toserver chunk 7 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
/* request */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER,
httpbuf_request, httpbuf_request_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
}
/* response */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT,
httpbuf_response, httpbuf_response_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
/* request */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER,
httpbuf_request, httpbuf_request_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
}
/* response */
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT,
httpbuf_response, httpbuf_response_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 7 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 7 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START|STREAM_EOF, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START|STREAM_EOF, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SCLogDebug("add chunk 1");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCLogDebug("inspect chunk 1");
SCLogDebug("add chunk 3");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCLogDebug("inspect chunk 4");
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START|STREAM_EOF, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, http_buf1, http_len1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, http_buf3, http_len3);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|STREAM_EOF, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_START|STREAM_EOF, http_buf2, http_len2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT|STREAM_EOF, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOCLIENT, httpbuf2, httplen2);
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
if (r != 0) {
printf("toclient chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http1_buf, http1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http2_buf, http2_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: \n", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf, http_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
if (r != 0) {
printf("toserver chunk 5 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
if (r != 0) {
printf("toserver chunk 6 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
if (r != 0) {
printf("toserver chunk 7 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
if (http_state == NULL) {
printf("no http state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect for p2 */
SCLogDebug("inspecting p2");
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
if (http_state == NULL) {
printf("no http state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect for p2 */
SCLogInfo("p2");
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
if (http_state == NULL) {
printf("no http state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect for p2 */
SCLogInfo("p2");
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
if (http_state == NULL) {
printf("no http state: ");
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect for p2 */
SCLogInfo("p2");
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, buf, buflen);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF_NOT(PacketAlertCheck(p, 1) == 1);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect for p1 */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
FAIL_IF(PacketAlertCheck(p1, 2));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect for p2 */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
FAIL_IF(http_state == NULL);
AppLayerHtpEnableRequestBodyCallback();
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START, httpbuf1, httplen1);
FAIL_IF(r != 0);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
StreamTcpFreeConfig(TRUE);
FLOW_DESTROY(&f);
UTHFreePacket(p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(!(PacketAlertCheck(p, 1)));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf7, httplen7);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf3, httplen3);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf4, httplen4);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(!(PacketAlertCheck(p, 1)));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf5, httplen5);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(PacketAlertCheck(p, 1));
p->alerts.cnt = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf6, httplen6);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SCLogDebug("sending data chunk 7");
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf7, httplen7);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *http_state = f.alstate;
FAIL_IF(http_state == NULL);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf1, sshlen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf2, sshlen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf3, sshlen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_SSH, STREAM_TOSERVER, sshbuf4, sshlen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SshState *ssh_state = f.alstate;
if (ssh_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER | STREAM_START, chello_buf,
chello_buf_len);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ssl_state = f.alstate;
FAIL_IF(ssl_state == NULL);
FAIL_IF(PacketAlertCheck(p, 4));
FAIL_IF(PacketAlertCheck(p, 5));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT, shello_buf,
shello_buf_len);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
p->alerts.cnt = 0;
PASS;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, client_change_cipher_spec_buf,
client_change_cipher_spec_buf_len);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
p->alerts.cnt = 0;
FAIL_IF(!PacketAlertCheck(p, 3));
FAIL_IF(PacketAlertCheck(p, 4));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT, server_change_cipher_spec_buf,
server_change_cipher_spec_buf_len);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
p->alerts.cnt = 0;
FAIL_IF(PacketAlertCheck(p, 3));
FAIL_IF(PacketAlertCheck(p, 4));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, toserver_app_data_buf,
toserver_app_data_buf_len);
FAIL_IF(r != 0);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
p->alerts.cnt = 0;
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf1, ssllen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf2, ssllen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf3, ssllen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf4, ssllen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *app_state = f.alstate;
if (app_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf1, ssllen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf2, ssllen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf3, ssllen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf4, ssllen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *app_state = f.alstate;
if (app_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf1, ssllen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf2, ssllen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf3, ssllen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, sslbuf4, ssllen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *app_state = f.alstate;
if (app_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
AppLayerParserParse(alp_tctx, &f, ALPROTO_TEMPLATE, STREAM_TOSERVER,
request, sizeof(request));
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* Check that we have app-layer state. */
FAIL_IF_NULL(f.alstate);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER,
client_hello, sizeof(client_hello));
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FAIL_IF(r != 0);
FAIL_IF(PacketAlertCheck(p1, 1));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT,
server_hello, sizeof(server_hello));
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FAIL_IF(r != 0);
FAIL_IF(PacketAlertCheck(p2, 1));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT,
certificate, sizeof(certificate));
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FAIL_IF(r != 0);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER,
client_hello, sizeof(client_hello));
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FAIL_IF(r != 0);
FAIL_IF(PacketAlertCheck(p1, 1));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT,
server_hello, sizeof(server_hello));
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FAIL_IF(r != 0);
FAIL_IF(PacketAlertCheck(p2, 1));
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOCLIENT,
certificate, sizeof(certificate));
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FAIL_IF(r != 0);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf, sizeof(buf));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ssl_state = f.alstate;
if (ssl_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, buf, sizeof(buf));
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
ssl_state = f.alstate;
if (ssl_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf2, tlslen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf3, tlslen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf4, tlslen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf2, tlslen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf3, tlslen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf4, tlslen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf1, tlslen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf2, tlslen2);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf3, tlslen3);
if (r != 0) {
printf("toserver chunk 3 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_TLS, STREAM_TOSERVER, tlsbuf4, tlslen4);
if (r != 0) {
printf("toserver chunk 4 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SSLState *ssl_state = f.alstate;
if (ssl_state == NULL) {
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|
STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
return result;
}
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|
STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
StreamTcpFreeConfig(TRUE);
if (htp_state != NULL)
HTPStateFree(htp_state);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
return result;
}
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|
STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
StreamTcpFreeConfig(TRUE);
if (htp_state != NULL)
HTPStateFree(htp_state);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
return result;
}
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER|STREAM_START|
STREAM_EOF, httpbuf1, httplen1);
if (r != 0) {
StreamTcpFreeConfig(TRUE);
if (htp_state != NULL)
HTPStateFree(htp_state);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
return result;
}
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf2, httplen2);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
if (r != 0) {
SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
HtpState *htp_state = f.alstate;
if (htp_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, buf, buflen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1) && PacketAlertCheck(p, 2))
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, buf, buflen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1) && PacketAlertCheck(p, 2))
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, buf, buflen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1) && PacketAlertCheck(p, 2))
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, buf, buflen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1) && PacketAlertCheck(p, 2))
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, buf, buflen);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
result = 0;
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (PacketAlertCheck(p, 1) && PacketAlertCheck(p, 2))
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p2);
SigGroupBuild(de_ctx);
DetectEngineThreadCtxInit(&tv, (void *)de_ctx, (void *)&det_ctx);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf1, http_buf1_len);
if (r != 0) {
printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
http_state = f.alstate;
if (http_state == NULL) {
goto end;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
r = AppLayerParserParse(alp_tctx, &f, ALPROTO_HTTP, STREAM_TOSERVER, http_buf2, http_buf2_len);
if (r != 0) {
printf("toserver chunk 2 returned %" PRId32 ", expected 0: ", r);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
goto end;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
/* do detect */
SigMatchSignatures(&tv, de_ctx, det_ctx, p2);
s = &ssn->client;
}
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpReassembleHandleSegment(&tv, ra_ctx, ssn, s, p, &pq) == -1) {
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
return -1;
}
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
return 0;
}
TcpStream *s = NULL;
s = &ssn.server;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpReassembleHandleSegment(&tv, ra_ctx, &ssn, s, p, &pq) == -1) {
printf("failed in segments reassembly, while processing toserver packet (1): ");
goto end;
end:
StreamTcpReassembleFreeThreadCtx(ra_ctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
return ret;
}
p->flow = &f;
p->tcph = &tcph;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
int ret = 0;
StreamTcpInitConfig(TRUE);
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
SCFree(p);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
return ret;
}
TcpStream *s = NULL;
s = &ssn.client;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
if (StreamTcpReassembleHandleSegment(&tv, ra_ctx, &ssn, s, p, &pq) == -1) {
printf("failed in segments reassembly, while processing toserver packet (1): ");
goto end;
StreamTcpReassembleFreeThreadCtx(ra_ctx);
StreamTcpFreeConfig(TRUE);
SCFree(p);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
UTHFreeFlow(f);
return ret;
}
TcpStream *s = NULL;
s = &ssn.server;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
if (StreamTcpReassembleHandleSegment(&tv, ra_ctx, &ssn, s, p, &pq) == -1) {
printf("failed in segments reassembly, while processing toserver packet (1): ");
goto end;
StreamTcpReassembleFreeThreadCtx(ra_ctx);
StreamTcpFreeConfig(TRUE);
SCFree(p);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
UTHFreeFlow(f);
return ret;
}
TcpStream *s = NULL;
s = &ssn.server;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
if (StreamTcpReassembleHandleSegment(&tv, ra_ctx, &ssn, s, p, &pq) == -1) {
printf("failed in segments reassembly, while processing toclient packet: ");
goto end;
StreamTcpReassembleFreeThreadCtx(ra_ctx);
StreamTcpFreeConfig(TRUE);
SCFree(p);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
UTHFreeFlow(f);
return ret;
}
TcpStream *s = NULL;
s = &ssn.server;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
if (StreamTcpReassembleHandleSegment(&tv, ra_ctx, &ssn, s, p, &pq) == -1) {
printf("failed in segments reassembly, while processing toclient packet\n");
goto end;
StreamTcpReassembleFreeThreadCtx(ra_ctx);
StreamTcpFreeConfig(TRUE);
SCFree(p);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
UTHFreeFlow(f);
return ret;
}
TcpStream *s = NULL;
uint8_t cnt = 0;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
for (cnt=0; cnt < httplen1; cnt++) {
tcph.th_seq = htonl(ssn.client.isn + 1 + cnt);
tcph.th_ack = htonl(572799782UL);
StreamTcpReassembleFreeThreadCtx(ra_ctx);
StreamTcpFreeConfig(TRUE);
SCFree(p);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
UTHFreeFlow(f);
return ret;
}
p->tcph->th_seq = htonl(12);
p->flow = &f;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->tcph->th_seq = htonl(12);
p->flow = &f;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->flow = &f;
p->flowflags |= FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->flow = &f;
p->flowflags |= FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->tcph->th_seq = htonl(12);
p->flow = &f;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->tcph->th_seq = htonl(12);
p->flow = &f;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->flow = &f;
p->flowflags |= FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->flow = &f;
p->flowflags |= FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->flow = &f;
p->flowflags |= FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
p->flow = f;
p->flowflags |= FLOW_PKT_TOSERVER;
- SCMutexLock(&f->m);
+ FLOWLOCK_WRLOCK(f);
if (StreamTcpUTAddSegmentWithPayload(&tv, ra_ctx, &ssn.server, 2, stream_payload1, 2) == -1) {
printf("failed to add segment 1: ");
goto end;
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
StreamTcpUTDeinit(ra_ctx);
- SCMutexUnlock(&f->m);
+ FLOWLOCK_UNLOCK(f);
UTHFreeFlow(f);
return ret;
}
p->tcph->th_seq = htonl(12);
p->flow = &f;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpUTAddSegmentWithByte(&tv, ra_ctx, &ssn.client, 2, 'A', 5) == -1) {
printf("failed to add segment 1: ");
goto end;
}
ret = 1;
end:
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
FLOW_DESTROY(&f);
UTHFreePacket(p);
StreamTcpUTClearSession(&ssn);
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1) {
goto end;
}
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->tcph = &tcph;
int ret = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
int ret = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->payload = payload;
p->payload_len = 3;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
tcph.th_flags = TH_FIN;
p->tcph = &tcph;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
/* StreamTcpPacket returns -1 on unsolicited FIN */
if (StreamTcpPacket(&tv, p, &stt, &pq) != -1) {
printf("StreamTcpPacket failed: ");
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->payload = payload;
p->payload_len = 1;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
FAIL_IF(StreamTcpPacket(&tv, p, &stt, &pq) == -1);
p->tcph->th_seq = htonl(11);
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
PASS;
p->payload = payload;
p->payload_len = 1;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
FAIL_IF(StreamTcpPacket(&tv, p, &stt, &pq) == -1);
p->tcph->th_seq = htonl(11);
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
PASS;
p->payload = payload;
p->payload_len = 1;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
StreamTcpSessionClear(p->flow->protoctx);
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->tcph = &tcph;
int ret = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->tcph = &tcph;
int ret = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->tcph = &tcph;
int ret = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->tcph = &tcph;
int ret = 0;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->payload = payload;
p->payload_len = 3;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
StreamTcpFreeConfig(TRUE);
ConfDeInit();
ConfRestoreContextBackup();
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
tcph.th_flags = TH_SYN;
p->tcph = &tcph;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
end:
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
tcph.th_flags = TH_SYN;
p->tcph = &tcph;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
end:
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
tcph.th_flags = TH_SYN;
p->tcph = &tcph;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
end:
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->payload = payload;
p->payload_len = 3;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
StreamTcpFreeConfig(TRUE);
ConfDeInit();
ConfRestoreContextBackup();
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->payload = payload;
p->payload_len = 3;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
StreamTcpFreeConfig(TRUE);
ConfDeInit();
ConfRestoreContextBackup();
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
p->payload = payload;
p->payload_len = 3;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
StreamTcpFreeConfig(TRUE);
ConfDeInit();
ConfRestoreContextBackup();
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1) {
printf("failed in processing packet\n");
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
stt.ra_ctx = ra_ctx;
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1) {
printf("failed in processing packet in StreamTcpPacket\n");
goto end;
end:
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
if (stt.ra_ctx != NULL)
StreamTcpInitConfig(TRUE);
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1) {
printf("failed in processing packet in StreamTcpPacket\n");
goto end;
end:
StreamTcpSessionClear(p->flow->protoctx);
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
if (stt.ra_ctx != NULL)
tcph.th_seq = htonl(100);
p->flowflags = FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
tcph.th_seq = htonl(100);
p->flowflags = FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
tcph.th_seq = htonl(100);
p->flowflags = FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
FLOW_DESTROY(&f);
return ret;
tcph.th_seq = htonl(100);
p->flowflags = FLOW_PKT_TOSERVER;
- SCMutexLock(&f.m);
+ FLOWLOCK_WRLOCK(&f);
if (StreamTcpPacket(&tv, p, &stt, &pq) == -1)
goto end;
ret = 1;
end:
StreamTcpFreeConfig(TRUE);
- SCMutexUnlock(&f.m);
+ FLOWLOCK_UNLOCK(&f);
SCFree(p);
return ret;
}