Skip to content

Commit f508f84

Browse files
committed
Solve conflicts
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
1 parent 2687497 commit f508f84

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

include/fastrtps/config.h.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,13 @@
130130
#define FASTDDS_SER_METHOD_DEPRECATED(major, entity_name, msg)
131131
#endif
132132

133+
#if defined(_MSC_VER) && !defined(__clang__)
134+
# define FASTDDS_UNREACHABLE() __assume(0)
135+
#elif defined(__GNUC__) || defined(__clang__)
136+
# define FASTDDS_UNREACHABLE() __builtin_unreachable()
137+
#else
138+
# include <cstdlib>
139+
# define FASTDDS_UNREACHABLE() std::abort()
140+
#endif // if defined(_MSC_VER) && !defined(__clang__)
141+
133142
#endif // _FASTRTPS_CONFIG_H_

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,7 @@ void PDPSimple::announceParticipantState(
279279
#endif // HAVE_SECURITY
280280

281281
auto endpoints = dynamic_cast<fastdds::rtps::SimplePDPEndpoints*>(builtin_endpoints_.get());
282-
<<<<<<< HEAD
283282
RTPSWriter& writer = *(endpoints->writer.writer_);
284-
=======
285-
assert(endpoints && endpoints->writer.history_);
286-
if (!endpoints || !endpoints->writer.history_)
287-
{
288-
FASTDDS_UNREACHABLE(); // “cannot happen” invariant
289-
}
290-
291-
>>>>>>> 910ac9907 (Assert liveliness with periodic heartbeats in secure participants (#6411))
292283
WriterHistory& history = *(endpoints->writer.history_);
293284
PDP::announceParticipantState(writer, history, new_change, dispose, wp);
294285

test/blackbox/common/BlackboxTestsSecurity.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,8 +3124,8 @@ TEST(Security, SecureParticipantsDoNotLoseDiscoveryWithoutUserTraffic)
31243124
const auto idle_timeout = std::chrono::seconds(6);
31253125
const auto data_timeout = std::chrono::seconds(10);
31263126
// Keep the lease short so loss of secure PDP liveliness shows up quickly
3127-
const auto lease_duration = eprosima::fastdds::dds::Duration_t(3, 0);
3128-
const auto announcement_period = eprosima::fastdds::dds::Duration_t(1, 0);
3127+
const auto lease_duration = eprosima::fastrtps::dds::Duration_t(3, 0);
3128+
const auto announcement_period = eprosima::fastrtps::dds::Duration_t(1, 0);
31293129
// Use UDP transport to later block the fallback participant DATA(P) traffic
31303130
auto reader_transport = std::make_shared<test_UDPv4TransportDescriptor>();
31313131
auto writer_transport = std::make_shared<test_UDPv4TransportDescriptor>();
@@ -3198,8 +3198,7 @@ TEST(Security, SecureParticipantsDoNotLoseDiscoveryWithoutUserTraffic)
31983198

31993199
// After the secure PDP endpoints are established, stop the unprotected participant DATA(P)
32003200
// traffic, to depend on the secure liveliness maintenance path
3201-
reader_transport->test_transport_options->always_drop_participant_builtin_topic_data = true;
3202-
writer_transport->test_transport_options->always_drop_participant_builtin_topic_data = true;
3201+
test_UDPv4Transport::always_drop_participant_builtin_topic_data = true;
32033202

32043203
// Exercise the idle scenario twice to catch both immediate loss and unstable recovery/rematch behavior
32053204
ASSERT_NO_FATAL_FAILURE(assert_idle_period_keeps_discovery());

0 commit comments

Comments
 (0)