@@ -1754,11 +1754,15 @@ void PDP::update_endpoint_locators_if_default_nts(
1754
1754
const RTPSParticipantAttributes& old_atts,
1755
1755
const RTPSParticipantAttributes& new_atts)
1756
1756
{
1757
+ // Check if default locators have changed
1757
1758
const auto & old_default_unicast = old_atts.defaultUnicastLocatorList ;
1759
+ const auto & old_default_multicast = old_atts.defaultMulticastLocatorList ;
1758
1760
const auto & new_default_unicast = new_atts.defaultUnicastLocatorList ;
1761
+ const auto & new_default_multicast = new_atts.defaultMulticastLocatorList ;
1759
1762
1760
1763
// Early return if there is no change in default unicast locators
1761
- if (old_default_unicast == new_default_unicast)
1764
+ if ((old_default_unicast == new_default_unicast) &&
1765
+ (old_default_multicast == new_default_multicast))
1762
1766
{
1763
1767
return ;
1764
1768
}
@@ -1767,8 +1771,8 @@ void PDP::update_endpoint_locators_if_default_nts(
1767
1771
EDP* edp = get_edp ();
1768
1772
for (BaseWriter* writer : writers)
1769
1773
{
1770
- if (writer->getAttributes ().multicastLocatorList . empty ( ) &&
1771
- writer->getAttributes ().unicastLocatorList . empty ( ))
1774
+ if ((old_default_multicast == writer->getAttributes ().multicastLocatorList ) &&
1775
+ (old_default_unicast == writer->getAttributes ().unicastLocatorList ))
1772
1776
{
1773
1777
WriterProxyData* wdata = nullptr ;
1774
1778
GUID_t participant_guid;
@@ -1787,8 +1791,8 @@ void PDP::update_endpoint_locators_if_default_nts(
1787
1791
}
1788
1792
for (BaseReader* reader : readers)
1789
1793
{
1790
- if (reader->getAttributes ().multicastLocatorList . empty ( ) &&
1791
- reader->getAttributes ().unicastLocatorList . empty ( ))
1794
+ if ((old_default_multicast == reader->getAttributes ().multicastLocatorList ) &&
1795
+ (old_default_unicast == reader->getAttributes ().unicastLocatorList ))
1792
1796
{
1793
1797
ReaderProxyData* rdata = nullptr ;
1794
1798
GUID_t participant_guid;
0 commit comments