general/bool: Use bool for file support

pull/9829/head
Jeff Lucovsky 2 years ago committed by Victor Julien
parent 310dcd1dc4
commit 051a14acd3

@ -1184,16 +1184,14 @@ uint64_t AppLayerParserGetTransactionActive(const Flow *f,
SCReturnCT(active_id, "uint64_t"); SCReturnCT(active_id, "uint64_t");
} }
int AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto) bool AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto)
{ {
// Custom case for only signature-only protocol so far // Custom case for only signature-only protocol so far
if (alproto == ALPROTO_HTTP) { if (alproto == ALPROTO_HTTP) {
return AppLayerParserSupportsFiles(ipproto, ALPROTO_HTTP1) || return AppLayerParserSupportsFiles(ipproto, ALPROTO_HTTP1) ||
AppLayerParserSupportsFiles(ipproto, ALPROTO_HTTP2); AppLayerParserSupportsFiles(ipproto, ALPROTO_HTTP2);
} }
if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].GetTxFiles != NULL) return alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].GetTxFiles != NULL;
return TRUE;
return FALSE;
} }
AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx) AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx)

@ -253,7 +253,7 @@ uint64_t AppLayerParserGetTransactionActive(const Flow *f, AppLayerParserState *
uint8_t AppLayerParserGetFirstDataDir(uint8_t ipproto, AppProto alproto); uint8_t AppLayerParserGetFirstDataDir(uint8_t ipproto, AppProto alproto);
int AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto); bool AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto);
AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx); AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx);
uint64_t AppLayerParserGetTxDetectFlags(AppLayerTxData *txd, const uint8_t dir); uint64_t AppLayerParserGetTxDetectFlags(AppLayerTxData *txd, const uint8_t dir);

Loading…
Cancel
Save