detect: simplify state detect code: remove unused params

pull/2622/head
Victor Julien 8 years ago
parent c961da2dce
commit 6c6802b957

@ -244,7 +244,7 @@ void DetectEngineStateFree(DetectEngineState *state)
return;
}
static int HasStoredSigs(Flow *f, uint8_t flags)
static int HasStoredSigs(const Flow *f, const uint8_t flags)
{
if (AppLayerParserProtocolSupportsTxs(f->proto, f->alproto)) {
AppProto alproto = f->alproto;
@ -290,8 +290,7 @@ static int HasStoredSigs(Flow *f, uint8_t flags)
* \retval 0 no inspectable state
* \retval 1 inspectable state
*/
int DeStateFlowHasInspectableState(Flow *f, AppProto alproto,
const uint8_t alversion, uint8_t flags)
int DeStateFlowHasInspectableState(const Flow *f, const uint8_t flags)
{
int r = 0;

@ -125,13 +125,12 @@ void DetectEngineStateFree(DetectEngineState *state);
* \brief Check if a flow already contains(newly updated as well) de state.
*
* \param f Pointer to the flow.
* \param alversino The alversion to check against de_state's.
* \param direction Direction to check. 0 - ts, 1 - tc.
* \param flags direction
*
* \retval 1 Has state.
* \retval 0 Has no state.
*/
int DeStateFlowHasInspectableState(Flow *f, AppProto alproto, uint8_t alversion, uint8_t flags);
int DeStateFlowHasInspectableState(const Flow *f, const uint8_t flags);
/**
* \brief Match app layer sig list against app state and store relevant match

@ -1166,7 +1166,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
/* stateful app layer detection */
if ((p->flags & PKT_HAS_FLOW) && has_state) {
memset(det_ctx->de_state_sig_array, 0x00, det_ctx->de_state_sig_array_len);
int has_inspectable_state = DeStateFlowHasInspectableState(pflow, alproto, alversion, flow_flags);
int has_inspectable_state = DeStateFlowHasInspectableState(pflow, flow_flags);
if (has_inspectable_state == 1) {
/* initialize to 0(DE_STATE_MATCH_HAS_NEW_STATE) */
DeStateDetectContinueDetection(th_v, de_ctx, det_ctx, p, pflow,

Loading…
Cancel
Save