Skip to content

Commit

Permalink
Revert ServicePubListener API break (#475)
Browse files Browse the repository at this point in the history
* Revert ServicePubListener API break

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Remove unnecessary member

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
  • Loading branch information
JLBuenoLopez authored Dec 1, 2020
1 parent 5274760 commit 89f5bc9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rmw_fastrtps_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ rmw_create_service(
delete info->pub_listener_;
}
});
info->pub_listener_ = new (std::nothrow) ServicePubListener(info);
info->pub_listener_ = new (std::nothrow) ServicePubListener();
if (!info->pub_listener_) {
RMW_SET_ERROR_MSG("failed to create service response publisher listener");
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion rmw_fastrtps_dynamic_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ rmw_create_service(
RMW_SET_ERROR_MSG("failed to get datawriter qos");
goto fail;
}
info->pub_listener_ = new ServicePubListener(info);
info->pub_listener_ = new ServicePubListener();
info->response_publisher_ =
Domain::createPublisher(participant, publisherParam, info->pub_listener_);
if (!info->response_publisher_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ class ServicePubListener : public eprosima::fastrtps::PublisherListener
rmw_fastrtps_shared_cpp::hash_fastrtps_guid>;

public:
explicit ServicePubListener(CustomServiceInfo * info)
: info_(info)
{
(void)info_;
}
ServicePubListener() = default;

void
onPublicationMatched(
Expand Down Expand Up @@ -149,7 +145,6 @@ class ServicePubListener : public eprosima::fastrtps::PublisherListener
}

private:
CustomServiceInfo * info_;
std::mutex mutex_;
subscriptions_set_t subscriptions_ RCPPUTILS_TSA_GUARDED_BY(mutex_);
clients_endpoints_map_t clients_endpoints_ RCPPUTILS_TSA_GUARDED_BY(mutex_);
Expand Down

0 comments on commit 89f5bc9

Please sign in to comment.