Skip to content

Commit

Permalink
Refs #18002. Update metatraffic_unicast_port_ inside applyLocatorAdap…
Browse files Browse the repository at this point in the history
…tRule.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Mar 12, 2024
1 parent 83286e1 commit 6e69211
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cpp/rtps/participant/RTPSParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,12 @@ Locator_t& RTPSParticipantImpl::applyLocatorAdaptRule(
{
// This is a completely made up rule
// It is transport responsibility to interpret this new port.
loc.port += m_att.port.participantIDGain;
uint16_t delta = m_att.port.participantIDGain;
if (metatraffic_unicast_port_ == loc.port)
{
metatraffic_unicast_port_ += delta;
}
loc.port += delta;
return loc;
}

Expand Down

0 comments on commit 6e69211

Please sign in to comment.