From 37be66eef9471d7b033feecf5330dc03ee7acad7 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 6 Jun 2024 17:24:20 +0200 Subject: [PATCH] detect/iprep: update function naming Bring in line with new Rust code naming for FFI functions. --- rust/src/detect/iprep.rs | 4 ++-- src/detect-iprep.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/src/detect/iprep.rs b/rust/src/detect/iprep.rs index 6604628edd..f4082683c3 100644 --- a/rust/src/detect/iprep.rs +++ b/rust/src/detect/iprep.rs @@ -147,7 +147,7 @@ pub fn detect_parse_iprep(i: &str) -> IResult<&str, DetectIPRepData, RuleParseEr } #[no_mangle] -pub unsafe extern "C" fn rs_detect_iprep_parse( +pub unsafe extern "C" fn SCDetectIPRepParse( ustr: *const std::os::raw::c_char, ) -> *mut DetectIPRepData { let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe @@ -161,7 +161,7 @@ pub unsafe extern "C" fn rs_detect_iprep_parse( } #[no_mangle] -pub unsafe extern "C" fn rs_detect_iprep_free(ctx: &mut DetectIPRepData) { +pub unsafe extern "C" fn SCDetectIPRepFree(ctx: &mut DetectIPRepData) { // Just unbox... std::mem::drop(Box::from_raw(ctx)); } diff --git a/src/detect-iprep.c b/src/detect-iprep.c index 93cf5b8b0e..d4ba6ced55 100644 --- a/src/detect-iprep.c +++ b/src/detect-iprep.c @@ -257,7 +257,7 @@ static int DetectIPRepMatch (DetectEngineThreadCtx *det_ctx, Packet *p, int DetectIPRepSetup (DetectEngineCtx *de_ctx, Signature *s, const char *rawstr) { - DetectIPRepData *cd = rs_detect_iprep_parse(rawstr); + DetectIPRepData *cd = SCDetectIPRepParse(rawstr); if (cd == NULL) { SCLogError("\"%s\" is not a valid setting for iprep", rawstr); goto error; @@ -287,7 +287,7 @@ void DetectIPRepFree (DetectEngineCtx *de_ctx, void *ptr) if (fd == NULL) return; - rs_detect_iprep_free(fd); + SCDetectIPRepFree(fd); } #ifdef UNITTESTS -- 2.47.2