@@ -186,17 +186,30 @@ static void setup_transports_udpv6(
186
186
att.userTransports .push_back (descriptor);
187
187
}
188
188
189
+ static void setup_large_data_shm_transport (
190
+ RTPSParticipantAttributes& att)
191
+ {
192
+ #ifdef FASTDDS_SHM_TRANSPORT_DISABLED
193
+ static_cast <void >(att);
194
+ EPROSIMA_LOG_ERROR (RTPS_PARTICIPANT, " Trying to configure Large Data transport, " <<
195
+ " but Fast DDS was built without SHM transport support. Will use " <<
196
+ " TCP for communications on the same host." );
197
+ #else
198
+ auto descriptor = create_shm_transport (att);
199
+ att.userTransports .push_back (descriptor);
200
+
201
+ auto shm_loc = fastdds::rtps::SHMLocator::create_locator (0 , fastdds::rtps::SHMLocator::Type::UNICAST);
202
+ att.defaultUnicastLocatorList .push_back (shm_loc);
203
+ #endif // FASTDDS_SHM_TRANSPORT_DISABLED
204
+ }
205
+
189
206
static void setup_transports_large_data (
190
207
RTPSParticipantAttributes& att,
191
208
bool intraprocess_only)
192
209
{
193
210
if (!intraprocess_only)
194
211
{
195
- auto shm_transport = create_shm_transport (att);
196
- att.userTransports .push_back (shm_transport);
197
-
198
- auto shm_loc = fastdds::rtps::SHMLocator::create_locator (0 , fastdds::rtps::SHMLocator::Type::UNICAST);
199
- att.defaultUnicastLocatorList .push_back (shm_loc);
212
+ setup_large_data_shm_transport (att);
200
213
201
214
auto tcp_transport = create_tcpv4_transport (att);
202
215
att.userTransports .push_back (tcp_transport);
@@ -229,11 +242,7 @@ static void setup_transports_large_datav6(
229
242
{
230
243
if (!intraprocess_only)
231
244
{
232
- auto shm_transport = create_shm_transport (att);
233
- att.userTransports .push_back (shm_transport);
234
-
235
- auto shm_loc = fastdds::rtps::SHMLocator::create_locator (0 , fastdds::rtps::SHMLocator::Type::UNICAST);
236
- att.defaultUnicastLocatorList .push_back (shm_loc);
245
+ setup_large_data_shm_transport (att);
237
246
238
247
auto tcp_transport = create_tcpv6_transport (att);
239
248
att.userTransports .push_back (tcp_transport);
0 commit comments