Skip to content

Commit b6c63bf

Browse files
committed
Refs #20629: Fix security DS
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
1 parent 0d35ae6 commit b6c63bf

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,13 @@ bool PDPServer::create_ds_pdp_reliable_endpoints(
391391
{
392392
endpoints.reader.reader_ = dynamic_cast<fastdds::rtps::StatefulReader*>(reader);
393393

394-
// Enable unknown clients to reach this reader
395-
BaseReader::downcast(endpoints.reader.reader_)->allow_unknown_writers();
394+
#if HAVE_SECURITY
395+
if (!secure)
396+
#endif // HAVE_SECURITY
397+
{
398+
// Enable unknown clients to reach this reader
399+
BaseReader::downcast(endpoints.reader.reader_)->allow_unknown_writers();
400+
}
396401

397402
#if HAVE_SECURITY
398403
mp_RTPSParticipant->set_endpoint_rtps_protection_supports(reader, false);

0 commit comments

Comments
 (0)