Skip to content

Commit

Permalink
Refs #21913: Add check in RTPSParticipant
Browse files Browse the repository at this point in the history
Signed-off-by: eProsima <[email protected]>
  • Loading branch information
JesusPoderoso committed Oct 17, 2024
1 parent 837c6c8 commit bb700cf
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/cpp/rtps/participant/RTPSParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,15 +492,24 @@ bool RTPSParticipantImpl::setup_transports()

transportDescriptor->unlock();

auto shm_transport_descriptor = dynamic_cast<SharedMemTransportDescriptor*>(transportDescriptor.get());
if (transport_registered)
{
has_shm_transport_ |=
(dynamic_cast<SharedMemTransportDescriptor*>(transportDescriptor.get()) != nullptr);
has_shm_transport_ |= (nullptr != shm_transport_descriptor);
if (nullptr != shm_transport_descriptor)
{
if (shm_transport_descriptor->max_message_size() > 572u)
{
EPROSIMA_LOG_ERROR(RTPS_PARTICIPANT,
"Unable to Register SHM Transport. Maximum message size needs to be"
"equal or higher than the PDP package size.");
}
}
}
else
{
// SHM transport could be disabled
if ((dynamic_cast<SharedMemTransportDescriptor*>(transportDescriptor.get()) != nullptr))
if (nullptr != shm_transport_descriptor)
{
EPROSIMA_LOG_ERROR(RTPS_PARTICIPANT,
"Unable to Register SHM Transport. SHM Transport is not supported in"
Expand Down

0 comments on commit bb700cf

Please sign in to comment.