Skip to content

Commit

Permalink
Fix error message (#175)
Browse files Browse the repository at this point in the history
Only generate "Recompile with '-DENABLESECURITY=ON' error when
ROS_SECURITY_STRATEGY="Enforce"

Signed-off-by: Sid Faber <sid.faber@canonical.com>
  • Loading branch information
SidFaber authored Apr 29, 2020
1 parent 3397c95 commit 8e14104
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions rmw_cyclonedds_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,12 @@ rmw_ret_t configure_qos_for_security(
return ret;
#else
(void) qos;
(void) security_options;
RMW_SET_ERROR_MSG(
"Security was requested but the Cyclone DDS being used does not have security "
"support enabled. Recompile Cyclone DDS with the '-DENABLE_SECURITY=ON' "
"CMake option");
if (security_options->enforce_security == RMW_SECURITY_ENFORCEMENT_ENFORCE) {
RMW_SET_ERROR_MSG(
"Security was requested but the Cyclone DDS being used does not have security "
"support enabled. Recompile Cyclone DDS with the '-DENABLE_SECURITY=ON' "
"CMake option");
}
return RMW_RET_UNSUPPORTED;
#endif
}
Expand Down

0 comments on commit 8e14104

Please sign in to comment.