Fix error message (#175)

Only generate "Recompile with '-DENABLESECURITY=ON' error when
ROS_SECURITY_STRATEGY="Enforce"

Signed-off-by: Sid Faber <sid.faber@canonical.com>
This commit is contained in:
Sid Faber 2020-04-29 17:38:00 -04:00 committed by GitHub
parent 3397c95095
commit 8e14104246
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -851,11 +851,12 @@ rmw_ret_t configure_qos_for_security(
return ret; return ret;
#else #else
(void) qos; (void) qos;
(void) security_options; if (security_options->enforce_security == RMW_SECURITY_ENFORCEMENT_ENFORCE) {
RMW_SET_ERROR_MSG( RMW_SET_ERROR_MSG(
"Security was requested but the Cyclone DDS being used does not have security " "Security was requested but the Cyclone DDS being used does not have security "
"support enabled. Recompile Cyclone DDS with the '-DENABLE_SECURITY=ON' " "support enabled. Recompile Cyclone DDS with the '-DENABLE_SECURITY=ON' "
"CMake option"); "CMake option");
}
return RMW_RET_UNSUPPORTED; return RMW_RET_UNSUPPORTED;
#endif #endif
} }