From 1896fe8bfffdf5333c3bdce361cce56d164a607e Mon Sep 17 00:00:00 2001 From: JLBuenoLopez-eProsima Date: Tue, 9 Apr 2024 09:06:50 +0200 Subject: [PATCH] Refs #20242: update discovery callbacks Signed-off-by: JLBuenoLopez-eProsima --- include/DiscoveryServerManager.h | 10 ++++++---- src/DiscoveryServerManager.cpp | 12 ++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/DiscoveryServerManager.h b/include/DiscoveryServerManager.h index 239ee8a0..8fb6303d 100644 --- a/include/DiscoveryServerManager.h +++ b/include/DiscoveryServerManager.h @@ -284,13 +284,15 @@ class DiscoveryServerManager ParticipantDiscoveryInfo&& info, bool& should_be_ignored) override; - void on_subscriber_discovery( + void on_data_reader_discovery( DomainParticipant* participant, - ReaderDiscoveryInfo&& info) override; + ReaderDiscoveryInfo&& info, + bool& should_be_ignored) override; - void on_publisher_discovery( + void on_data_writer_discovery( DomainParticipant* participant, - WriterDiscoveryInfo&& info) override; + WriterDiscoveryInfo&& info, + bool& should_be_ignored) override; // callback liveliness functions void on_liveliness_changed( diff --git a/src/DiscoveryServerManager.cpp b/src/DiscoveryServerManager.cpp index afe3f70e..cf559506 100644 --- a/src/DiscoveryServerManager.cpp +++ b/src/DiscoveryServerManager.cpp @@ -1735,10 +1735,12 @@ void DiscoveryServerManager::on_participant_discovery( } } -void DiscoveryServerManager::on_subscriber_discovery( +void DiscoveryServerManager::on_data_reader_discovery( DomainParticipant* participant, - ReaderDiscoveryInfo&& info) + ReaderDiscoveryInfo&& info, + bool& should_be_ignored) { + static_cast(should_be_ignored); typedef ReaderDiscoveryInfo::DISCOVERY_STATUS DS; // if the callback origin was removed ignore @@ -1813,10 +1815,12 @@ void DiscoveryServerManager::on_subscriber_discovery( << " topic: " << info.info.topicName() << " GUID: " << subsid); } -void DiscoveryServerManager::on_publisher_discovery( +void DiscoveryServerManager::on_data_writer_discovery( DomainParticipant* participant, - WriterDiscoveryInfo&& info) + WriterDiscoveryInfo&& info, + bool& should_be_ignored) { + static_cast(should_be_ignored); typedef WriterDiscoveryInfo::DISCOVERY_STATUS DS; // if the callback origin was removed ignore