compile fixes

pull/753/head
Victor Julien 11 years ago
parent 59327e0fd4
commit 1cbd1cdf36

@ -662,10 +662,9 @@ int AppLayerParserGetEventInfo(uint16_t ipproto, AppProto alproto, const char *e
{ {
SCEnter(); SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto); int ipproto_map = FlowGetProtoMapping(ipproto);
SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo == NULL) ? int r = (alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo == NULL) ?
-1 : -1 : alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo(event_name, event_id, event_type);
alp_ctx.ctxs[ipproto_map][alproto]. SCReturnInt(r);
StateGetEventInfo(event_name, event_id, event_type));
} }
uint8_t AppLayerParserGetFirstDataDir(uint16_t ipproto, uint16_t alproto) uint8_t AppLayerParserGetFirstDataDir(uint16_t ipproto, uint16_t alproto)
@ -860,16 +859,16 @@ int AppLayerParserProtocolIsTxEventAware(uint16_t ipproto, AppProto alproto)
{ {
SCEnter(); SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto); int ipproto_map = FlowGetProtoMapping(ipproto);
SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateHasEvents == NULL) ? int r = (alp_ctx.ctxs[ipproto_map][alproto].StateHasEvents == NULL) ? 0 : 1;
0 : 1); SCReturnInt(r);
} }
int AppLayerParserProtocolSupportsTxs(uint16_t ipproto, AppProto alproto) int AppLayerParserProtocolSupportsTxs(uint16_t ipproto, AppProto alproto)
{ {
SCEnter(); SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto); int ipproto_map = FlowGetProtoMapping(ipproto);
SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateTransactionFree == NULL) ? int r = (alp_ctx.ctxs[ipproto_map][alproto].StateTransactionFree == NULL) ? 0 : 1;
0 : 1); SCReturnInt(r);
} }
void AppLayerParserTriggerRawStreamReassembly(Flow *f) void AppLayerParserTriggerRawStreamReassembly(Flow *f)

@ -3610,6 +3610,7 @@ static int DetectEngineHttpClientBodyTest29(void)
DetectEngineCtx *de_ctx = NULL; DetectEngineCtx *de_ctx = NULL;
DetectEngineThreadCtx *det_ctx = NULL; DetectEngineThreadCtx *det_ctx = NULL;
Flow f; Flow f;
void *alp_tctx = NULL;
const char *request_buffer = "GET /one HTTP/1.0\r\n" const char *request_buffer = "GET /one HTTP/1.0\r\n"
"Host: localhost\r\n" "Host: localhost\r\n"
"\r\n"; "\r\n";
@ -3623,7 +3624,7 @@ static int DetectEngineHttpClientBodyTest29(void)
strlen(request_buffer)); strlen(request_buffer));
} }
uint32_t http_buf_len = TOTAL_REQUESTS * 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(&th_v, 0, sizeof(th_v));
memset(&f, 0, sizeof(f)); memset(&f, 0, sizeof(f));

Loading…
Cancel
Save