diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 14bc3616..52fecd17 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,7 @@ name: build on: pull_request: push: - branches: [ main ] + branches: [ main, test_macros ] defaults: run: shell: bash diff --git a/rmw_zenoh_cpp/src/rmw_zenoh.cpp b/rmw_zenoh_cpp/src/rmw_zenoh.cpp index 95c59d23..43f66e40 100644 --- a/rmw_zenoh_cpp/src/rmw_zenoh.cpp +++ b/rmw_zenoh_cpp/src/rmw_zenoh.cpp @@ -206,7 +206,7 @@ rmw_create_node( z_drop(z_move(node_data->token)); } }); - if (!zc_liveliness_token_check(&node_data->token)) { + if (!z_check(&node_data->token)) { RCUTILS_LOG_ERROR_NAMED( "rmw_zenoh_cpp", "Unable to create liveliness token for the node."); @@ -249,7 +249,7 @@ rmw_destroy_node(rmw_node_t * node) // Undeclare liveliness token for the node to advertise that the node has ridden off into the sunset. rmw_node_data_t * node_data = static_cast(node->data); - zc_liveliness_undeclare_token(z_move(node_data->token)); + z_drop(z_move(node_data->token)); rcutils_allocator_t * allocator = &node->context->options.allocator; @@ -580,10 +580,10 @@ rmw_create_publisher( auto free_token = rcpputils::make_scope_exit( [publisher_data]() { if (publisher_data != nullptr) { - zc_liveliness_undeclare_token(z_move(publisher_data->token)); + z_drop(z_move(publisher_data->token)); } }); - if (!zc_liveliness_token_check(&publisher_data->token)) { + if (!z_check(&publisher_data->token)) { RCUTILS_LOG_ERROR_NAMED( "rmw_zenoh_cpp", "Unable to create liveliness token for the publisher."); @@ -644,7 +644,7 @@ rmw_destroy_publisher(rmw_node_t * node, rmw_publisher_t * publisher) // // TODO(Yadunund): Should this really return an error? // return RMW_RET_ERROR; // } - zc_liveliness_undeclare_token(z_move(publisher_data->token)); + z_drop(z_move(publisher_data->token)); RMW_TRY_DESTRUCTOR(publisher_data->type_support->~MessageTypeSupport(), MessageTypeSupport, ); allocator->deallocate(publisher_data->type_support, allocator->state); @@ -1267,10 +1267,10 @@ rmw_create_subscription( auto free_token = rcpputils::make_scope_exit( [sub_data]() { if (sub_data != nullptr) { - zc_liveliness_undeclare_token(z_move(sub_data->token)); + z_drop(z_move(sub_data->token)); } }); - if (!zc_liveliness_token_check(&sub_data->token)) { + if (!z_check(&sub_data->token)) { RCUTILS_LOG_ERROR_NAMED( "rmw_zenoh_cpp", "Unable to create liveliness token for the subscription."); @@ -1315,7 +1315,7 @@ rmw_destroy_subscription(rmw_node_t * node, rmw_subscription_t * subscription) if (sub_data != nullptr) { // Publish to the graph that a subscription has ridden off into the sunset - zc_liveliness_undeclare_token(z_move(sub_data->token)); + z_drop(z_move(sub_data->token)); RMW_TRY_DESTRUCTOR(sub_data->type_support->~MessageTypeSupport(), MessageTypeSupport, ); allocator->deallocate(sub_data->type_support, allocator->state);