Skip to content

Commit

Permalink
Support for API break on Fast RTPS 2.0 (#370)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany authored Apr 21, 2020
1 parent 86ae164 commit 45709b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rmw_fastrtps_shared_cpp/src/participant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ rmw_fastrtps_shared_cpp::create_participant(
// Load default XML profile.
Domain::getDefaultParticipantAttributes(participantAttrs);

participantAttrs.rtps.builtin.domainId = static_cast<uint32_t>(domain_id);

if (localhost_only) {
Locator_t local_network_interface_locator;
static const std::string local_ip_name("127.0.0.1");
Expand All @@ -165,7 +163,11 @@ rmw_fastrtps_shared_cpp::create_participant(
participantAttrs.rtps.builtin.initialPeersList.push_back(local_network_interface_locator);
}

#if FASTRTPS_VERSION_MAJOR < 2
participantAttrs.rtps.builtin.domainId = static_cast<uint32_t>(domain_id);
#else
participantAttrs.domainId = static_cast<uint32_t>(domain_id);
#endif

size_t length = snprintf(nullptr, 0, "enclave=%s;", enclave) + 1;
participantAttrs.rtps.userData.resize(length);
Expand Down

0 comments on commit 45709b7

Please sign in to comment.