From 7a62ac50e50abb2c04de006792aa7facd41eda72 Mon Sep 17 00:00:00 2001 From: Joseph Perez Date: Tue, 1 Oct 2024 11:59:53 +0200 Subject: [PATCH] fix: typo --- include/zenoh_concrete.h | 2 +- src/get.rs | 2 +- src/publisher.rs | 2 +- src/put.rs | 2 +- src/result.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/zenoh_concrete.h b/include/zenoh_concrete.h index 20c722a34..65fa420d8 100644 --- a/include/zenoh_concrete.h +++ b/include/zenoh_concrete.h @@ -32,7 +32,7 @@ #define Z_ENULL -5 #define Z_EUNAVAILABLE -6 #define Z_EDESERIALIZE -7 -#define Z_SESSION_CLOSED -8 +#define Z_ESESSION_CLOSED -8 #define Z_EBUSY_MUTEX -16 #define Z_EINVAL_MUTEX -22 #define Z_EAGAIN_MUTEX -11 diff --git a/src/get.rs b/src/get.rs index 8f6d82cd7..7ec363d14 100644 --- a/src/get.rs +++ b/src/get.rs @@ -280,7 +280,7 @@ pub unsafe extern "C" fn z_get( .wait() { Ok(()) => result::Z_OK, - Err(e) if e.downcast_ref::().is_some() => result::Z_SESSION_CLOSED, + Err(e) if e.downcast_ref::().is_some() => result::Z_ESESSION_CLOSED, Err(e) => { tracing::error!("{}", e); result::Z_EGENERIC diff --git a/src/publisher.rs b/src/publisher.rs index 469b856c9..25aebf5e1 100644 --- a/src/publisher.rs +++ b/src/publisher.rs @@ -242,7 +242,7 @@ pub unsafe extern "C" fn z_publisher_put( match put.wait() { Ok(_) => result::Z_OK, - Err(e) if e.downcast_ref::().is_some() => result::Z_SESSION_CLOSED, + Err(e) if e.downcast_ref::().is_some() => result::Z_ESESSION_CLOSED, Err(e) => { tracing::error!("{}", e); result::Z_EGENERIC diff --git a/src/put.rs b/src/put.rs index 05f2cdca7..da21a095b 100644 --- a/src/put.rs +++ b/src/put.rs @@ -127,7 +127,7 @@ pub extern "C" fn z_put( } match put.wait() { Ok(_) => result::Z_OK, - Err(e) if e.downcast_ref::().is_some() => result::Z_SESSION_CLOSED, + Err(e) if e.downcast_ref::().is_some() => result::Z_ESESSION_CLOSED, Err(e) => { tracing::error!("{}", e); result::Z_EGENERIC diff --git a/src/result.rs b/src/result.rs index c5ecd56a5..fd19a38b9 100644 --- a/src/result.rs +++ b/src/result.rs @@ -25,7 +25,7 @@ pub const Z_ENETWORK: z_result_t = -4; pub const Z_ENULL: z_result_t = -5; pub const Z_EUNAVAILABLE: z_result_t = -6; pub const Z_EDESERIALIZE: z_result_t = -7; -pub const Z_SESSION_CLOSED: z_result_t = -8; +pub const Z_ESESSION_CLOSED: z_result_t = -8; // negative pthread error codes (due to convention to return negative values on error) pub const Z_EBUSY_MUTEX: z_result_t = -16; pub const Z_EINVAL_MUTEX: z_result_t = -22;