From 004248f699c6032162818606d20f28cb93b7047f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 26 Feb 2015 17:32:36 +0100 Subject: [PATCH] detect-state: remove DeStateResetFileInspection It was effectively unused. --- src/detect-engine-state.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/detect-engine-state.c b/src/detect-engine-state.c index 63208c7355..59eb0554ae 100644 --- a/src/detect-engine-state.c +++ b/src/detect-engine-state.c @@ -156,33 +156,6 @@ static int DeStateStoreFilestoreSigsCantMatch(SigGroupHead *sgh, DetectEngineSta return 0; } -static void DeStateResetFileInspection(Flow *f, AppProto alproto, void *alstate, uint8_t direction) -{ - if (f == NULL || alproto != ALPROTO_HTTP || alstate == NULL || f->de_state == NULL) - return; - - FLOWLOCK_WRLOCK(f); - HtpState *htp_state = (HtpState *)alstate; - - if (direction & STREAM_TOSERVER) { - if (htp_state->flags & HTP_FLAG_NEW_FILE_TX_TS) { - SCLogDebug("new file in the TS direction"); - htp_state->flags &= ~HTP_FLAG_NEW_FILE_TX_TS; - f->de_state->dir_state[0].flags |= DETECT_ENGINE_STATE_FLAG_FILE_TS_NEW; - } - } else { - if (htp_state->flags & HTP_FLAG_NEW_FILE_TX_TC) { - SCLogDebug("new file in the TC direction"); - htp_state->flags &= ~HTP_FLAG_NEW_FILE_TX_TC; - f->de_state->dir_state[1].flags |= DETECT_ENGINE_STATE_FLAG_FILE_TC_NEW; - } - } - - FLOWLOCK_UNLOCK(f); -} - - - DetectEngineState *DetectEngineStateAlloc(void) { DetectEngineState *d = SCMalloc(sizeof(DetectEngineState)); @@ -521,8 +494,6 @@ void DeStateDetectContinueDetection(ThreadVars *tv, DetectEngineCtx *de_ctx, DetectEngineStateDirection *dir_state = &f->de_state->dir_state[flags & STREAM_TOSERVER ? 0 : 1]; DeStateStore *store = dir_state->head; - DeStateResetFileInspection(f, alproto, alstate, flags); - if (AppLayerParserProtocolSupportsTxs(f->proto, alproto)) { FLOWLOCK_RDLOCK(f); alstate = FlowGetAppState(f); -- 2.47.3