Skip to content

Commit

Permalink
Fixups.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Oct 31, 2024
1 parent b276dd2 commit 0de5712
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions rmw_zenoh_cpp/src/detail/rmw_client_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void client_data_drop(void * data)
}

--num_in_flight_it->second;
if (num_in_flight_it->second == 0 && deleted_clients.count(client) > 0) {
if (num_in_flight_it->second == 0 && deleted_clients.count(client_data) > 0) {
deleted_clients.erase(client_data);
}
}
Expand Down Expand Up @@ -178,8 +178,8 @@ std::shared_ptr<ClientData> ClientData::make(
service_members->request_members_->data);
auto response_members = static_cast<const message_type_support_callbacks_t *>(
service_members->response_members_->data);
auto request_type_support = std::make_unique<RequestTypeSupport>(service_members);
auto response_type_support = std::make_unique<ResponseTypeSupport>(service_members);
auto request_type_support = std::make_shared<RequestTypeSupport>(service_members);
auto response_type_support = std::make_shared<ResponseTypeSupport>(service_members);

// Note: Service request/response types will contain a suffix Request_ or Response_.
// We remove the suffix when appending the type to the liveliness tokens for
Expand Down Expand Up @@ -290,14 +290,14 @@ ClientData::ClientData(
std::shared_ptr<liveliness::Entity> entity,
const void * request_type_support_impl,
const void * response_type_support_impl,
std::unique_ptr<RequestTypeSupport> request_type_support,
std::unique_ptr<ResponseTypeSupport> response_type_support)
std::shared_ptr<RequestTypeSupport> request_type_support,
std::shared_ptr<ResponseTypeSupport> response_type_support)
: rmw_node_(rmw_node),
entity_(std::move(entity)),
request_type_support_impl_(request_type_support_impl),
response_type_support_impl_(response_type_support_impl),
request_type_support_(std::move(request_type_support)),
response_type_support_(std::move(response_type_support)),
request_type_support_(request_type_support),
response_type_support_(response_type_support),
wait_set_data_(nullptr),
sequence_number_(1),
is_shutdown_(false)
Expand Down
8 changes: 4 additions & 4 deletions rmw_zenoh_cpp/src/detail/rmw_client_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class ClientData final
std::shared_ptr<liveliness::Entity> entity,
const void * request_type_support_impl,
const void * response_type_support_impl,
std::unique_ptr<RequestTypeSupport> request_type_support,
std::unique_ptr<ResponseTypeSupport> response_type_support);
std::shared_ptr<RequestTypeSupport> request_type_support,
std::shared_ptr<ResponseTypeSupport> response_type_support);

// Internal mutex.
mutable std::mutex mutex_;
Expand All @@ -129,8 +129,8 @@ class ClientData final
// Type support fields.
const void * request_type_support_impl_;
const void * response_type_support_impl_;
std::unique_ptr<RequestTypeSupport> request_type_support_;
std::unique_ptr<ResponseTypeSupport> response_type_support_;
std::shared_ptr<RequestTypeSupport> request_type_support_;
std::shared_ptr<ResponseTypeSupport> response_type_support_;
// Deque to store the replies in the order they arrive.
std::deque<std::unique_ptr<rmw_zenoh_cpp::ZenohReply>> reply_queue_;
// Wait set data.
Expand Down

0 comments on commit 0de5712

Please sign in to comment.