Skip to content

Commit

Permalink
Refs #20707: Uncrustify
Browse files Browse the repository at this point in the history
Signed-off-by: eduponz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed May 30, 2024
1 parent d3116b6 commit 7ba97e7
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct ParticipantDiscoveryInfo
REMOVED_PARTICIPANT,
DROPPED_PARTICIPANT,
IGNORED_PARTICIPANT
};
}

ParticipantDiscoveryInfo(
const ParticipantProxyData& data)
Expand Down
24 changes: 16 additions & 8 deletions src/cpp/rtps/builtin/discovery/participant/PDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,30 @@ void PDP::initializeParticipantProxyData(

if (attributes.builtin.use_WriterLivelinessProtocol)
{
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER;
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER;

#if HAVE_SECURITY
if (mp_RTPSParticipant->is_secure())
{
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_SECURE_DATA_WRITER;
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_SECURE_DATA_READER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_SECURE_DATA_WRITER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_SECURE_DATA_READER;
}
#endif // if HAVE_SECURITY
}
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REQUEST_DATA_READER;
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REPLY_DATA_WRITER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REQUEST_DATA_READER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REPLY_DATA_WRITER;

participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REQUEST_DATA_WRITER;
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REPLY_DATA_READER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REQUEST_DATA_WRITER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REPLY_DATA_READER;

#if HAVE_SECURITY
if (mp_RTPSParticipant->is_secure())
Expand Down
15 changes: 10 additions & 5 deletions src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,27 @@ void PDPSimple::initializeParticipantProxyData(
use_PublicationReaderANDSubscriptionWriter)
{
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR;
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER;
}

#if HAVE_SECURITY
if (getRTPSParticipant()->getAttributes().builtin.discovery_config.m_simpleEDP.
enable_builtin_secure_publications_writer_and_subscriptions_reader)
{
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_ANNOUNCER;
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_DETECTOR;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_ANNOUNCER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_DETECTOR;
}

if (getRTPSParticipant()->getAttributes().builtin.discovery_config.m_simpleEDP.
enable_builtin_secure_subscriptions_writer_and_publications_reader)
{
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_ANNOUNCER;
participant_data->m_availableBuiltinEndpoints |= fastdds::rtps::DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_DETECTOR;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_ANNOUNCER;
participant_data->m_availableBuiltinEndpoints |=
fastdds::rtps::DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_DETECTOR;
}
#endif // if HAVE_SECURITY
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MockAccessControlPlugin : public AccessControl
SecurityException & exception), (override));

MOCK_METHOD(bool, get_permissions_token, (
PermissionsToken * *permissions_token,
PermissionsToken** permissions_token,
const PermissionsHandle& handle,
SecurityException & exception), (override));

Expand All @@ -54,7 +54,7 @@ class MockAccessControlPlugin : public AccessControl
SecurityException & exception), (override));

MOCK_METHOD(bool, get_permissions_credential_token, (
PermissionsCredentialToken * *permissions_credential_token,
PermissionsCredentialToken** permissions_credential_token,
const PermissionsHandle& handle,
SecurityException & exception), (override));

Expand Down
3 changes: 2 additions & 1 deletion test/unittest/rtps/discovery/PDPTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ class TesterPDPEndpoints : public fastdds::rtps::PDPEndpoints

fastrtps::rtps::BuiltinEndpointSet_t builtin_endpoints() const override
{
return fastdds::rtps::DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER | fastdds::rtps::DISC_BUILTIN_ENDPOINT_PARTICIPANT_DETECTOR;
return fastdds::rtps::DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER |
fastdds::rtps::DISC_BUILTIN_ENDPOINT_PARTICIPANT_DETECTOR;
}

const std::unique_ptr<fastrtps::rtps::ReaderListener>& main_listener() const override
Expand Down

0 comments on commit 7ba97e7

Please sign in to comment.