From 9d3a2c1204721ea6a9319cb7805b3a008ed57fee Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Tue, 8 Nov 2022 14:42:02 +0100 Subject: [PATCH] Fix requester and replier reuse behaviour Signed-off-by: Pablo Garrido --- src/cpp/middleware/fastdds/FastDDSEntities.cpp | 8 ++++---- src/cpp/middleware/fastdds/FastDDSMiddleware.cpp | 4 ++-- src/cpp/replier/Replier.cpp | 2 +- src/cpp/requester/Requester.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cpp/middleware/fastdds/FastDDSEntities.cpp b/src/cpp/middleware/fastdds/FastDDSEntities.cpp index 0124f16b..390c6d1a 100644 --- a/src/cpp/middleware/fastdds/FastDDSEntities.cpp +++ b/src/cpp/middleware/fastdds/FastDDSEntities.cpp @@ -524,7 +524,7 @@ ReturnCode_t FastDDSParticipant::delete_publisher( return ret; } } - } + } } return ptr_->delete_publisher(publisher); @@ -567,7 +567,7 @@ ReturnCode_t FastDDSParticipant::delete_subscriber( return ret; } } - } + } } return ptr_->delete_subscriber(subscriber); @@ -1225,8 +1225,8 @@ bool FastDDSRequester::match(const fastrtps::RequesterAttributes& attrs) const fastdds::dds::SubscriberQos qos_subscriber; set_qos_from_attributes(qos_subscriber, attrs.subscriber); - return reply_topic_->match(attrs.publisher.topic) - && request_topic_->match(attrs.subscriber.topic) + return reply_topic_->match(attrs.subscriber.topic) + && request_topic_->match(attrs.publisher.topic) && publisher_ptr_->get_qos() == qos_publisher && subscriber_ptr_->get_qos() == qos_subscriber; } diff --git a/src/cpp/middleware/fastdds/FastDDSMiddleware.cpp b/src/cpp/middleware/fastdds/FastDDSMiddleware.cpp index 30a41373..4656dae5 100644 --- a/src/cpp/middleware/fastdds/FastDDSMiddleware.cpp +++ b/src/cpp/middleware/fastdds/FastDDSMiddleware.cpp @@ -1173,7 +1173,7 @@ bool FastDDSMiddleware::matched_requester_from_xml( auto it = requesters_.find(requester_id); if (requesters_.end() != it) { - rv = it->second->match_from_ref(xml); + rv = it->second->match_from_xml(xml); } return rv; } @@ -1212,7 +1212,7 @@ bool FastDDSMiddleware::matched_replier_from_xml( auto it = repliers_.find(requester_id); if (repliers_.end() != it) { - rv = it->second->match_from_ref(xml); + rv = it->second->match_from_xml(xml); } return rv; } diff --git a/src/cpp/replier/Replier.cpp b/src/cpp/replier/Replier.cpp index 69daecc6..c6010caa 100644 --- a/src/cpp/replier/Replier.cpp +++ b/src/cpp/replier/Replier.cpp @@ -98,7 +98,7 @@ bool Replier::matched( } case dds::xrce::REPRESENTATION_AS_XML_STRING: { - const std::string& xml = new_object_rep.replier().representation().object_reference(); + const std::string& xml = new_object_rep.replier().representation().xml_string_representation(); rv = proxy_client_->get_middleware().matched_replier_from_xml(get_raw_id(), xml); break; } diff --git a/src/cpp/requester/Requester.cpp b/src/cpp/requester/Requester.cpp index 19b59ab1..d747f0ed 100644 --- a/src/cpp/requester/Requester.cpp +++ b/src/cpp/requester/Requester.cpp @@ -100,7 +100,7 @@ bool Requester::matched( } case dds::xrce::REPRESENTATION_AS_XML_STRING: { - const std::string& xml = new_object_rep.requester().representation().object_reference(); + const std::string& xml = new_object_rep.requester().representation().xml_string_representation(); rv = proxy_client_->get_middleware().matched_requester_from_xml(get_raw_id(), xml); break; }