Amend rmw_init() implementation: require enclave. (#204)

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This commit is contained in:
Michel Hidalgo 2020-07-07 10:51:38 -03:00 committed by Alejandro Hernández Cordero
parent 7eff1eab55
commit 5930ea020c

View file

@ -1131,6 +1131,10 @@ extern "C" rmw_ret_t rmw_init(const rmw_init_options_t * options, rmw_context_t
options->implementation_identifier, options->implementation_identifier,
eclipse_cyclonedds_identifier, eclipse_cyclonedds_identifier,
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION); return RMW_RET_INCORRECT_RMW_IMPLEMENTATION);
RMW_CHECK_FOR_NULL_WITH_MSG(
options->enclave,
"expected non-null enclave",
return RMW_RET_INVALID_ARGUMENT);
if (NULL != context->implementation_identifier) { if (NULL != context->implementation_identifier) {
RMW_SET_ERROR_MSG("expected a zero-initialized context"); RMW_SET_ERROR_MSG("expected a zero-initialized context");
return RMW_RET_INVALID_ARGUMENT; return RMW_RET_INVALID_ARGUMENT;