Skip to content

Commit 4401cb1

Browse files
committed
Refs #21690. Add empty method to update endpoint locators.
Signed-off-by: Miguel Company <[email protected]>
1 parent 2297f17 commit 4401cb1

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/cpp/rtps/builtin/discovery/participant/PDP.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
#endif // if HAVE_SECURITY
6363
#include <utils/shared_mutex.hpp>
6464
#include <utils/TimeConversion.hpp>
65+
#include <rtps/writer/BaseWriter.hpp>
66+
#include <rtps/reader/BaseReader.hpp>
6567

6668
namespace eprosima {
6769
namespace fastdds {
@@ -1746,6 +1748,18 @@ void PDP::local_participant_attributes_update_nts(
17461748
new_atts.default_external_unicast_locators);
17471749
}
17481750

1751+
void PDP::update_endpoint_locators_if_default_nts(
1752+
const std::vector<BaseWriter*>& writers,
1753+
const std::vector<BaseReader*>& readers,
1754+
const RTPSParticipantAttributes& old_atts,
1755+
const RTPSParticipantAttributes& new_atts)
1756+
{
1757+
static_cast<void>(writers);
1758+
static_cast<void>(readers);
1759+
static_cast<void>(old_atts);
1760+
static_cast<void>(new_atts);
1761+
}
1762+
17491763
} /* namespace rtps */
17501764
} /* namespace fastdds */
17511765
} /* namespace eprosima */

src/cpp/rtps/builtin/discovery/participant/PDP.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,12 @@ class PDP : public fastdds::statistics::rtps::IProxyQueryable
494494
virtual void local_participant_attributes_update_nts(
495495
const RTPSParticipantAttributes& new_atts);
496496

497+
virtual void update_endpoint_locators_if_default_nts(
498+
const std::vector<BaseWriter*>& writers,
499+
const std::vector<BaseReader*>& readers,
500+
const RTPSParticipantAttributes& old_atts,
501+
const RTPSParticipantAttributes& new_atts);
502+
497503
protected:
498504

499505
//!Pointer to the builtin protocols object.

src/cpp/rtps/participant/RTPSParticipantImpl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,12 @@ void RTPSParticipantImpl::update_attributes(
15331533
std::lock_guard<std::recursive_mutex> lock(*pdp->getMutex());
15341534
pdp->local_participant_attributes_update_nts(temp_atts);
15351535

1536+
if (local_interfaces_changed && internal_default_locators_)
1537+
{
1538+
std::lock_guard<shared_mutex> _(endpoints_list_mutex);
1539+
pdp->update_endpoint_locators_if_default_nts(m_userWriterList, m_userReaderList, m_att, temp_atts);
1540+
}
1541+
15361542
if (local_interfaces_changed)
15371543
{
15381544
createSenderResources(temp_atts.builtin.metatrafficMulticastLocatorList);

0 commit comments

Comments
 (0)