Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert ServicePubListener API break #475

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -241,7 +241,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 @@ -231,7 +231,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)
jacobperron marked this conversation as resolved.
Show resolved Hide resolved
{
(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