diff --git a/src/detect-engine.c b/src/detect-engine.c index 22166127f4..3e1ce93cf6 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -214,7 +214,7 @@ void DetectFrameInspectEngineRegister(const char *name, int dir, * * \note errors are fatal */ void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, - int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData) + int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData) { BUG_ON(progress >= 48); @@ -225,15 +225,12 @@ void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uin } SCLogDebug("name %s id %d", name, sm_list); - if ((alproto >= ALPROTO_FAILED) || - (!(dir == SIG_FLAG_TOSERVER || dir == SIG_FLAG_TOCLIENT)) || - (sm_list < DETECT_SM_LIST_MATCH) || (sm_list >= SHRT_MAX) || - (progress < 0 || progress >= SHRT_MAX) || - (Callback2 == NULL)) - { + if ((alproto >= ALPROTO_FAILED) || (!(dir == SIG_FLAG_TOSERVER || dir == SIG_FLAG_TOCLIENT)) || + (sm_list < DETECT_SM_LIST_MATCH) || (sm_list >= SHRT_MAX) || + (progress < 0 || progress >= SHRT_MAX) || (Callback == NULL)) { SCLogError("Invalid arguments"); BUG_ON(1); - } else if (Callback2 == DetectEngineInspectBufferGeneric && GetData == NULL) { + } else if (Callback == DetectEngineInspectBufferGeneric && GetData == NULL) { SCLogError("Invalid arguments: must register " "GetData with DetectEngineInspectBufferGeneric"); BUG_ON(1); @@ -256,7 +253,7 @@ void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uin new_engine->sm_list = (uint16_t)sm_list; new_engine->sm_list_base = (uint16_t)sm_list; new_engine->progress = (int16_t)progress; - new_engine->v2.Callback = Callback2; + new_engine->v2.Callback = Callback; new_engine->v2.GetData = GetData; if (g_app_inspect_engines == NULL) { diff --git a/src/detect-engine.h b/src/detect-engine.h index a5bfc329a9..c0b694eb01 100644 --- a/src/detect-engine.h +++ b/src/detect-engine.h @@ -162,7 +162,7 @@ int DetectEngineInspectPktBufferGeneric( * \param Callback The engine callback. */ void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, - int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData); + int progress, InspectEngineFuncPtr Callback2, InspectionBufferGetDataPtr GetData); void DetectPktInspectEngineRegister(const char *name, InspectionBufferGetPktDataPtr GetPktData, diff --git a/src/detect-parse.h b/src/detect-parse.h index 2eecd286f6..9901801410 100644 --- a/src/detect-parse.h +++ b/src/detect-parse.h @@ -33,7 +33,7 @@ typedef struct DetectFileHandlerTableElmt_ { const char *name; int priority; PrefilterRegisterFunc PrefilterFn; - InspectEngineFuncPtr2 Callback; + InspectEngineFuncPtr Callback; InspectionBufferGetDataPtr GetData; int al_protocols[MAX_DETECT_ALPROTO_CNT]; int tx_progress; diff --git a/src/detect.h b/src/detect.h index 36e4e2ba3b..8278290a29 100644 --- a/src/detect.h +++ b/src/detect.h @@ -413,7 +413,7 @@ typedef InspectionBuffer *(*InspectionBufferGetDataPtr)( void *txv, const int list_id); struct DetectEngineAppInspectionEngine_; -typedef uint8_t (*InspectEngineFuncPtr2)(struct DetectEngineCtx_ *de_ctx, +typedef uint8_t (*InspectEngineFuncPtr)(struct DetectEngineCtx_ *de_ctx, struct DetectEngineThreadCtx_ *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine, const struct Signature_ *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id); @@ -430,7 +430,7 @@ typedef struct DetectEngineAppInspectionEngine_ { struct { InspectionBufferGetDataPtr GetData; - InspectEngineFuncPtr2 Callback; + InspectEngineFuncPtr Callback; /** pointer to the transforms in the 'DetectBuffer entry for this list */ const DetectEngineTransforms *transforms; } v2;