diff --git a/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp b/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp index 0d0647c8e32..95578291d2e 100644 --- a/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp +++ b/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp @@ -186,17 +186,39 @@ static void setup_transports_udpv6( att.userTransports.push_back(descriptor); } +static void setup_large_data_shm_transport( + RTPSParticipantAttributes& att, + const fastdds::rtps::BuiltinTransportsOptions& options) +{ +#ifdef FASTDDS_SHM_TRANSPORT_DISABLED + static_cast(att); + EPROSIMA_LOG_ERROR(RTPS_PARTICIPANT, "Trying to configure Large Data transport, " << + "but Fast DDS was built without SHM transport support. Will use " << + "TCP for communications on the same host."); +#else + auto descriptor = create_shm_transport(att, options); + att.userTransports.push_back(descriptor); + + auto shm_loc = fastdds::rtps::SHMLocator::create_locator(0, fastdds::rtps::SHMLocator::Type::UNICAST); + att.defaultUnicastLocatorList.push_back(shm_loc); +#endif // FASTDDS_SHM_TRANSPORT_DISABLED +} + static void setup_transports_large_data( RTPSParticipantAttributes& att, bool intraprocess_only) { if (!intraprocess_only) { +<<<<<<< HEAD auto shm_transport = create_shm_transport(att); att.userTransports.push_back(shm_transport); auto shm_loc = fastdds::rtps::SHMLocator::create_locator(0, fastdds::rtps::SHMLocator::Type::UNICAST); att.defaultUnicastLocatorList.push_back(shm_loc); +======= + setup_large_data_shm_transport(att, options); +>>>>>>> a7dfdf5b4 (Check if `SHM` transport is disabled in `LARGE_DATA` modes (#5355)) auto tcp_transport = create_tcpv4_transport(att); att.userTransports.push_back(tcp_transport); @@ -229,11 +251,15 @@ static void setup_transports_large_datav6( { if (!intraprocess_only) { +<<<<<<< HEAD auto shm_transport = create_shm_transport(att); att.userTransports.push_back(shm_transport); auto shm_loc = fastdds::rtps::SHMLocator::create_locator(0, fastdds::rtps::SHMLocator::Type::UNICAST); att.defaultUnicastLocatorList.push_back(shm_loc); +======= + setup_large_data_shm_transport(att, options); +>>>>>>> a7dfdf5b4 (Check if `SHM` transport is disabled in `LARGE_DATA` modes (#5355)) auto tcp_transport = create_tcpv6_transport(att); att.userTransports.push_back(tcp_transport);