diff --git a/include/zenoh-pico/api/primitives.h b/include/zenoh-pico/api/primitives.h index f058df229..fee0150ed 100644 --- a/include/zenoh-pico/api/primitives.h +++ b/include/zenoh-pico/api/primitives.h @@ -1057,7 +1057,7 @@ void z_closure_reply_call(const z_loaned_closure_reply_t *closure, z_loaned_repl * Return: * ``0`` in case of success, negative error code otherwise */ -z_result_t z_closure_hello(z_owned_closure_hello_t *closure, z_loaned_hello_handler_t call, +z_result_t z_closure_hello(z_owned_closure_hello_t *closure, z_closure_hello_callback_t call, z_closure_drop_callback_t drop, void *context); /** diff --git a/include/zenoh-pico/api/types.h b/include/zenoh-pico/api/types.h index 3415100c4..c5a76dbd8 100644 --- a/include/zenoh-pico/api/types.h +++ b/include/zenoh-pico/api/types.h @@ -450,11 +450,11 @@ typedef struct { */ _Z_OWNED_TYPE_VALUE(_z_closure_reply_t, closure_reply) -typedef void (*z_loaned_hello_handler_t)(z_loaned_hello_t *hello, void *arg); +typedef void (*z_closure_hello_callback_t)(z_loaned_hello_t *hello, void *arg); typedef struct { void *context; - z_loaned_hello_handler_t call; + z_closure_hello_callback_t call; z_closure_drop_callback_t drop; } _z_closure_hello_t; diff --git a/src/api/api.c b/src/api/api.c index 3c929a127..712d5e35b 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -552,12 +552,12 @@ _Z_OWNED_FUNCTIONS_RC_IMPL(session) _Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_sample, _z_closure_sample_callback_t, z_closure_drop_callback_t) _Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_query, _z_closure_query_callback_t, z_closure_drop_callback_t) _Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_reply, _z_closure_reply_callback_t, z_closure_drop_callback_t) -_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_hello, z_loaned_hello_handler_t, z_closure_drop_callback_t) +_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_hello, z_closure_hello_callback_t, z_closure_drop_callback_t) _Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_zid, z_closure_zid_callback_t, z_closure_drop_callback_t) /************* Primitives **************/ typedef struct __z_hello_handler_wrapper_t { - z_loaned_hello_handler_t user_call; + z_closure_hello_callback_t user_call; void *ctx; } __z_hello_handler_wrapper_t;