Skip to content

Commit bca97db

Browse files
authored
Amend rmw_init() implementation: require enclave. (#204)
Signed-off-by: Michel Hidalgo <[email protected]>
1 parent 04d4299 commit bca97db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rmw_cyclonedds_cpp/src/rmw_node.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,10 @@ extern "C" rmw_ret_t rmw_init(const rmw_init_options_t * options, rmw_context_t
11311131
options->implementation_identifier,
11321132
eclipse_cyclonedds_identifier,
11331133
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION);
1134+
RMW_CHECK_FOR_NULL_WITH_MSG(
1135+
options->enclave,
1136+
"expected non-null enclave",
1137+
return RMW_RET_INVALID_ARGUMENT);
11341138
if (NULL != context->implementation_identifier) {
11351139
RMW_SET_ERROR_MSG("expected a zero-initialized context");
11361140
return RMW_RET_INVALID_ARGUMENT;

0 commit comments

Comments
 (0)