From: Pierre Chifflier Date: Mon, 15 Jan 2018 21:52:39 +0000 (+0100) Subject: Rust: fix prototype of parsing function (make pstate mutable) X-Git-Tag: suricata-4.1.0-rc1~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b810275b162f47340069c22ac4aed01ee302795f;p=thirdparty%2Fsuricata.git Rust: fix prototype of parsing function (make pstate mutable) --- diff --git a/rust/src/ntp/ntp.rs b/rust/src/ntp/ntp.rs index 38c6650307..eb03cc3d6c 100644 --- a/rust/src/ntp/ntp.rs +++ b/rust/src/ntp/ntp.rs @@ -192,7 +192,7 @@ pub extern "C" fn rs_ntp_state_free(state: *mut libc::c_void) { #[no_mangle] pub extern "C" fn rs_ntp_parse_request(_flow: *const core::Flow, state: *mut libc::c_void, - _pstate: *const libc::c_void, + _pstate: *mut libc::c_void, input: *const libc::uint8_t, input_len: u32, _data: *const libc::c_void) -> i8 { @@ -204,7 +204,7 @@ pub extern "C" fn rs_ntp_parse_request(_flow: *const core::Flow, #[no_mangle] pub extern "C" fn rs_ntp_parse_response(_flow: *const core::Flow, state: *mut libc::c_void, - _pstate: *const libc::c_void, + _pstate: *mut libc::c_void, input: *const libc::uint8_t, input_len: u32, _data: *const libc::c_void) -> i8 { diff --git a/rust/src/parser.rs b/rust/src/parser.rs index efee0c4c45..c5c689af7b 100644 --- a/rust/src/parser.rs +++ b/rust/src/parser.rs @@ -117,7 +117,7 @@ macro_rules! cast_pointer { pub type ParseFn = extern "C" fn (flow: *const Flow, state: *mut c_void, - pstate: *const c_void, + pstate: *mut c_void, input: *const u8, input_len: u32, data: *const c_void) -> i8;