Skip to content

Commit

Permalink
Make rmw_service_server_is_available return RMW_RET_INVALID_ARGUMENT (#…
Browse files Browse the repository at this point in the history
…150)

Signed-off-by: Christophe Bedard <[email protected]>
  • Loading branch information
christophebedard authored Jun 13, 2024
1 parent 8a3078b commit 2a0c216
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions rmw_connextdds_common/src/common/rmw_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,25 +188,19 @@ rmw_api_connextdds_service_server_is_available(
const rmw_client_t * client,
bool * is_available)
{
// TODO(asorbini): Return RMW_RET_INVALID_ARGUMENT. We return RMW_RET_ERROR
// because that's what's expected by test_rmw_implementation
RMW_CHECK_ARGUMENT_FOR_NULL(node, RMW_RET_ERROR);
RMW_CHECK_ARGUMENT_FOR_NULL(node, RMW_RET_INVALID_ARGUMENT);
RMW_CHECK_TYPE_IDENTIFIERS_MATCH(
node,
node->implementation_identifier,
RMW_CONNEXTDDS_ID,
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION);
// TODO(asorbini): Return RMW_RET_INVALID_ARGUMENT. We return RMW_RET_ERROR
// because that's what's expected by test_rmw_implementation
RMW_CHECK_ARGUMENT_FOR_NULL(client, RMW_RET_ERROR);
RMW_CHECK_ARGUMENT_FOR_NULL(client, RMW_RET_INVALID_ARGUMENT);
RMW_CHECK_TYPE_IDENTIFIERS_MATCH(
client,
client->implementation_identifier,
RMW_CONNEXTDDS_ID,
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION);
// TODO(asorbini): Return RMW_RET_INVALID_ARGUMENT. We return RMW_RET_ERROR
// because that's what's expected by test_rmw_implementation
RMW_CHECK_ARGUMENT_FOR_NULL(is_available, RMW_RET_ERROR);
RMW_CHECK_ARGUMENT_FOR_NULL(is_available, RMW_RET_INVALID_ARGUMENT);

RMW_Connext_Client * const client_impl =
reinterpret_cast<RMW_Connext_Client *>(client->data);
Expand Down

0 comments on commit 2a0c216

Please sign in to comment.