mpm method: remove unused function args

pull/2310/head
Victor Julien 10 years ago
parent 3d5807ba44
commit b40ecb7356

@ -68,14 +68,12 @@
* \retval ret Number of matches. * \retval ret Number of matches.
*/ */
static inline uint32_t HttpMethodPatternSearch(DetectEngineThreadCtx *det_ctx, static inline uint32_t HttpMethodPatternSearch(DetectEngineThreadCtx *det_ctx,
const uint8_t *raw_method, const uint32_t raw_method_len, const uint8_t *raw_method, const uint32_t raw_method_len)
const uint8_t flags)
{ {
SCEnter(); SCEnter();
uint32_t ret = 0; uint32_t ret = 0;
DEBUG_VALIDATE_BUG_ON(flags & STREAM_TOCLIENT);
DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_hmd_ctx_ts == NULL); DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_hmd_ctx_ts == NULL);
if (raw_method_len >= det_ctx->sgh->mpm_hmd_ctx_ts->minlen) { if (raw_method_len >= det_ctx->sgh->mpm_hmd_ctx_ts->minlen) {
@ -87,9 +85,7 @@ static inline uint32_t HttpMethodPatternSearch(DetectEngineThreadCtx *det_ctx,
SCReturnUInt(ret); SCReturnUInt(ret);
} }
int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, Flow *f, int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, void *txv)
HtpState *htp_state, uint8_t flags,
void *txv, uint64_t idx)
{ {
uint32_t cnt = 0; uint32_t cnt = 0;
htp_tx_t *tx = (htp_tx_t *)txv; htp_tx_t *tx = (htp_tx_t *)txv;
@ -98,8 +94,7 @@ int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, Flow *f,
cnt = HttpMethodPatternSearch(det_ctx, cnt = HttpMethodPatternSearch(det_ctx,
(const uint8_t *)bstr_ptr(tx->request_method), (const uint8_t *)bstr_ptr(tx->request_method),
bstr_len(tx->request_method), bstr_len(tx->request_method));
flags);
end: end:
return cnt; return cnt;
} }

@ -31,9 +31,9 @@ int DetectEngineInspectHttpMethod(ThreadVars *tv,
Signature *s, Flow *f, uint8_t flags, Signature *s, Flow *f, uint8_t flags,
void *alstate, void *alstate,
void *tx, uint64_t tx_id); void *tx, uint64_t tx_id);
int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, Flow *f,
HtpState *htp_state, uint8_t flags, int DetectEngineRunHttpMethodMpm(DetectEngineThreadCtx *det_ctx, void *txv);
void *tx, uint64_t idx);
void DetectEngineHttpMethodRegisterTests(void); void DetectEngineHttpMethodRegisterTests(void);
#endif /* __DETECT_ENGINE_HMD_H__ */ #endif /* __DETECT_ENGINE_HMD_H__ */

@ -914,7 +914,7 @@ static inline void DetectMpmPrefilter(DetectEngineCtx *de_ctx,
} }
if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HMD) { if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HMD) {
PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_HMD); PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_HMD);
DetectEngineRunHttpMethodMpm(det_ctx, p->flow, alstate, flags, tx, idx); DetectEngineRunHttpMethodMpm(det_ctx, tx);
PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_HMD); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_HMD);
} }
} }

Loading…
Cancel
Save