From e7041e56dbd4b801962e7ff4694f5c3e2dae60e1 Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Tue, 28 Apr 2020 14:29:59 -0300 Subject: [PATCH] Reset security related RMW error state. If security support is not required, the lack of it is not an error. Signed-off-by: Michel Hidalgo --- rmw_cyclonedds_cpp/src/rmw_node.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rmw_cyclonedds_cpp/src/rmw_node.cpp b/rmw_cyclonedds_cpp/src/rmw_node.cpp index e4f5e5ad..0b114275 100644 --- a/rmw_cyclonedds_cpp/src/rmw_node.cpp +++ b/rmw_cyclonedds_cpp/src/rmw_node.cpp @@ -922,6 +922,8 @@ extern "C" rmw_ret_t rmw_init(const rmw_init_options_t * options, rmw_context_t if (context->options.security_options.enforce_security == RMW_SECURITY_ENFORCEMENT_ENFORCE) { return RMW_RET_ERROR; } + // No security enforced, lack of support is not an error. + rmw_reset_error(); } impl->ppant = dds_create_participant(domain_id, ppant_qos.get(), nullptr); if (impl->ppant < 0) {