Skip to content

Commit

Permalink
Amend rmw_init() implementation: require enclave. (#406)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic authored and ahcorde committed Oct 8, 2020
1 parent a2cf797 commit 2d569c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context)
options->implementation_identifier,
eprosima_fastrtps_identifier,
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) {
RMW_SET_ERROR_MSG("expected a zero-initialized context");
return RMW_RET_INVALID_ARGUMENT;
Expand Down
4 changes: 4 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context)
options->implementation_identifier,
eprosima_fastrtps_identifier,
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) {
RMW_SET_ERROR_MSG("expected a zero-initialized context");
return RMW_RET_INVALID_ARGUMENT;
Expand Down

0 comments on commit 2d569c5

Please sign in to comment.