From 78fed36f6ef5163cd504e73e9f9451168afe2b4c Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Tue, 22 Oct 2024 09:46:07 +0200 Subject: [PATCH] Refs #21959: Fix Signed-off-by: Mario Dominguez --- src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp b/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp index 88a7f1dc389..c04501b8e86 100644 --- a/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp +++ b/src/cpp/rtps/attributes/RTPSParticipantAttributes.cpp @@ -223,11 +223,12 @@ static void setup_transports_large_data( { if (!intraprocess_only) { - auto shm_transport = create_shm_transport(att, options); - att.userTransports.push_back(shm_transport); +#ifdef SHM_TRANSPORT_BUILTIN + setup_transports_shm(att, options); auto shm_loc = fastdds::rtps::SHMLocator::create_locator(0, fastdds::rtps::SHMLocator::Type::UNICAST); att.defaultUnicastLocatorList.push_back(shm_loc); +#endif // ifdef SHM_TRANSPORT_BUILTIN auto tcp_transport = create_tcpv4_transport(att, options); att.userTransports.push_back(tcp_transport); @@ -260,11 +261,12 @@ static void setup_transports_large_datav6( { if (!intraprocess_only) { - auto shm_transport = create_shm_transport(att, options); - att.userTransports.push_back(shm_transport); +#ifdef SHM_TRANSPORT_BUILTIN + setup_transports_shm(att, options); auto shm_loc = fastdds::rtps::SHMLocator::create_locator(0, fastdds::rtps::SHMLocator::Type::UNICAST); att.defaultUnicastLocatorList.push_back(shm_loc); +#endif // ifdef SHM_TRANSPORT_BUILTIN auto tcp_transport = create_tcpv6_transport(att, options); att.userTransports.push_back(tcp_transport);