{
SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto);
- SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo == NULL) ?
- -1 :
- alp_ctx.ctxs[ipproto_map][alproto].
- StateGetEventInfo(event_name, event_id, event_type));
+ int r = (alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo == NULL) ?
+ -1 : alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo(event_name, event_id, event_type);
+ SCReturnInt(r);
}
uint8_t AppLayerParserGetFirstDataDir(uint16_t ipproto, uint16_t alproto)
{
SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto);
- SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateHasEvents == NULL) ?
- 0 : 1);
+ int r = (alp_ctx.ctxs[ipproto_map][alproto].StateHasEvents == NULL) ? 0 : 1;
+ SCReturnInt(r);
}
int AppLayerParserProtocolSupportsTxs(uint16_t ipproto, AppProto alproto)
{
SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto);
- SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateTransactionFree == NULL) ?
- 0 : 1);
+ int r = (alp_ctx.ctxs[ipproto_map][alproto].StateTransactionFree == NULL) ? 0 : 1;
+ SCReturnInt(r);
}
void AppLayerParserTriggerRawStreamReassembly(Flow *f)
DetectEngineCtx *de_ctx = NULL;
DetectEngineThreadCtx *det_ctx = NULL;
Flow f;
+ void *alp_tctx = NULL;
const char *request_buffer = "GET /one HTTP/1.0\r\n"
"Host: localhost\r\n"
"\r\n";
strlen(request_buffer));
}
uint32_t http_buf_len = TOTAL_REQUESTS * strlen(request_buffer);
- void *alp_tctx = AppLayerParserGetCtxThread();
+ alp_tctx = AppLayerParserGetCtxThread();
memset(&th_v, 0, sizeof(th_v));
memset(&f, 0, sizeof(f));