From 0ea46ed4646b0e529be758a6572b5d630ce35429 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Quiros Date: Tue, 14 Feb 2023 11:21:41 +0100 Subject: [PATCH] Fix management inner calls --- waku-bindings/src/node/management.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/waku-bindings/src/node/management.rs b/waku-bindings/src/node/management.rs index 0998cf6..1feb1a5 100644 --- a/waku-bindings/src/node/management.rs +++ b/waku-bindings/src/node/management.rs @@ -61,7 +61,7 @@ pub fn waku_start() -> Result { /// Stops a Waku node /// as per the [specification](https://rfc.vac.dev/spec/36/#extern-char-waku_stop) pub fn waku_stop() -> Result { - let response_ptr = unsafe { waku_sys::waku_start() }; + let response_ptr = unsafe { waku_sys::waku_stop() }; let response = unsafe { CStr::from_ptr(response_ptr) } .to_str() .expect("Response should always succeed to load to a &str"); @@ -79,7 +79,7 @@ pub fn waku_stop() -> Result { /// If the execution is successful, the result is the peer ID as a string (base58 encoded) /// as per the [specification](https://rfc.vac.dev/spec/36/#extern-char-waku_stop) pub fn waku_peer_id() -> Result { - let response_ptr = unsafe { waku_sys::waku_start() }; + let response_ptr = unsafe { waku_sys::waku_peerid() }; let response = unsafe { CStr::from_ptr(response_ptr) } .to_str() .expect("Response should always succeed to load to a &str"); @@ -97,7 +97,7 @@ pub fn waku_peer_id() -> Result { /// Get the multiaddresses the Waku node is listening to /// as per [specification](https://rfc.vac.dev/spec/36/#extern-char-waku_listen_addresses) pub fn waku_listen_addresses() -> Result> { - let response_ptr = unsafe { waku_sys::waku_start() }; + let response_ptr = unsafe { waku_sys::waku_listen_addresses() }; let response = unsafe { CStr::from_ptr(response_ptr) } .to_str() .expect("Response should always succeed to load to a &str");