Skip to content

Commit

Permalink
Change add to the map to listener callback
Browse files Browse the repository at this point in the history
Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
  • Loading branch information
JLBuenoLopez committed Oct 21, 2020
1 parent 2a88843 commit 2ece75b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 264 deletions.
256 changes: 0 additions & 256 deletions diff_eprosima.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ class ServiceListener : public eprosima::fastrtps::SubscriberListener
request.sample_identity_.writer_guid() = reader_guid;
}

// Save both guids in the clients_endpoints map
const eprosima::fastrtps::rtps::GUID_t & writer_guid =
request.sample_info_.sample_identity.writer_guid();
info_->pub_listener_->clients_endpoints().emplace(reader_guid, writer_guid);
info_->pub_listener_->clients_endpoints().emplace(writer_guid, reader_guid);

std::lock_guard<std::mutex> lock(internalMutex_);

if (conditionMutex_ != nullptr) {
Expand Down
8 changes: 0 additions & 8 deletions rmw_fastrtps_shared_cpp/src/rmw_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ __rmw_take_request(
delete request.buffer_;

*taken = true;

// Save both endpoint GUIDs in the clients_endpoints map
ServicePubListener * listener = info->pub_listener_;
eprosima::fastrtps::rtps::GUID_t related_guid = request.sample_identity_.writer_guid();
eprosima::fastrtps::rtps::GUID_t writer_guid =
request.sample_info_.sample_identity.writer_guid();
listener->clients_endpoints().emplace(related_guid, writer_guid);
listener->clients_endpoints().emplace(writer_guid, related_guid);
}

return RMW_RET_OK;
Expand Down

0 comments on commit 2ece75b

Please sign in to comment.