Skip to content

Commit

Permalink
Add z_drop for liveliness
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Nov 9, 2023
1 parent 9cada9f commit 4928b11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/z_liveliness.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ int main(int argc, char **argv) {
sleep(1);
} else if (c == 'd') {
printf("Undeclaring liveliness token...\n");
zc_liveliness_undeclare_token(&token);
z_drop(z_move(token));
}
}

zc_liveliness_undeclare_token(z_move(token));
z_drop(z_move(token));
z_close(z_move(s));
return 0;
}
3 changes: 2 additions & 1 deletion include/zenoh_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
z_owned_reply_channel_t * : z_reply_channel_drop, \
zc_owned_payload_t * : zc_payload_drop, \
zc_owned_shmbuf_t * : zc_shmbuf_drop, \
zc_owned_shm_manager_t * : zc_shm_manager_drop \
zc_owned_shm_manager_t * : zc_shm_manager_drop, \
zc_owned_liveliness_token_t * : zc_liveliness_undeclare_token \
)(x)

#define z_null(x) (*x = \
Expand Down

0 comments on commit 4928b11

Please sign in to comment.