Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan authored and imstevenpmwork committed Aug 8, 2024
1 parent 014885c commit 23f53f8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rmw_zenoh_cpp/src/rmw_zenoh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ bool rmw_feature_supported(rmw_feature_t feature) {
/// Create a node and return a handle to that node.
rmw_node_t *rmw_create_node(rmw_context_t *context, const char *name,
const char *namespace_) {

RMW_ZENOH_LOG_ERROR_NAMED("DBG", "rmw_create_node");

RMW_CHECK_ARGUMENT_FOR_NULL(context, nullptr);
RMW_CHECK_TYPE_IDENTIFIERS_MATCH(context, context->implementation_identifier,
rmw_zenoh_cpp::rmw_zenoh_identifier,
Expand Down Expand Up @@ -312,11 +315,7 @@ rmw_node_t *rmw_create_node(rmw_context_t *context, const char *name,
"Failed to declare liveness token.");
return nullptr;
}
node_data->token = zc_liveliness_declare_token(
z_loan(context->impl->session),
z_keyexpr(node_data->entity->keyexpr().c_str()),
NULL
);

auto free_token = rcpputils::make_scope_exit(
[node_data]() { z_drop(z_move(node_data->token)); });
if (!z_check(node_data->token)) {
Expand Down

0 comments on commit 23f53f8

Please sign in to comment.