Skip to content

Commit

Permalink
clean merge
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Dec 9, 2024
1 parent 9e2e837 commit 23f4235
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 0 additions & 2 deletions rmw_zenoh_cpp/src/detail/rmw_client_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ void client_data_handler(z_loaned_reply_t * reply, void * data)
std::chrono::nanoseconds::rep received_timestamp =
std::chrono::system_clock::now().time_since_epoch().count();

z_owned_reply_t owned_reply;
z_reply_clone(&owned_reply, reply);
client_data->add_new_reply(
std::make_unique<rmw_zenoh_cpp::ZenohReply>(reply, received_timestamp));
}
Expand Down
6 changes: 3 additions & 3 deletions rmw_zenoh_cpp/src/detail/rmw_publisher_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ class PublisherData final
// Get a copy of the TopicInfo of this PublisherData.
liveliness::TopicInfo topic_info() const;

// Returns true if liveliness token is still valid.
bool liveliness_is_valid() const;

// Copy the GID of this PublisherData into an rmw_gid_t.
void copy_gid(uint8_t out_gid[RMW_GID_STORAGE_SIZE]) const;

// Returns true if liveliness token is still valid.
bool liveliness_is_valid() const;

// Get the events manager of this PublisherData.
std::shared_ptr<EventsManager> events_mgr() const;

Expand Down
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/rmw_service_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ServiceData final
const rmw_node_t * rmw_node_;
// The Entity generated for the service.
std::shared_ptr<liveliness::Entity> entity_;
// The keyexpr string.
// An owned keyexpression.
z_owned_keyexpr_t keyexpr_;
// An owned queryable.
z_owned_queryable_t qable_;
Expand Down
5 changes: 4 additions & 1 deletion rmw_zenoh_cpp/src/detail/zenoh_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ std::chrono::nanoseconds::rep ZenohQuery::get_received_timestamp() const
}

///=============================================================================
ZenohQuery::~ZenohQuery() {z_drop(z_move(query_));}
ZenohQuery::~ZenohQuery()
{
z_drop(z_move(query_));
}

///=============================================================================
const z_loaned_query_t * ZenohQuery::get_query() const {return z_loan(query_);}
Expand Down
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/rmw_zenoh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ rmw_publisher_assert_liveliness(const rmw_publisher_t * publisher)
auto pub_data = node_data->get_pub_data(publisher);
RMW_CHECK_ARGUMENT_FOR_NULL(pub_data, RMW_RET_INVALID_ARGUMENT);

if (pub_data->is_shutdown()) {
if (!pub_data->liveliness_is_valid()) {
return RMW_RET_ERROR;
}

Expand Down

0 comments on commit 23f4235

Please sign in to comment.