From 2a0c2160424b1d7d14523039e9baf76e73ba90c4 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Thu, 13 Jun 2024 15:35:29 -0400 Subject: [PATCH] Make rmw_service_server_is_available return RMW_RET_INVALID_ARGUMENT (#150) Signed-off-by: Christophe Bedard --- rmw_connextdds_common/src/common/rmw_info.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/rmw_connextdds_common/src/common/rmw_info.cpp b/rmw_connextdds_common/src/common/rmw_info.cpp index cabdcadb..0418acf9 100644 --- a/rmw_connextdds_common/src/common/rmw_info.cpp +++ b/rmw_connextdds_common/src/common/rmw_info.cpp @@ -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(client->data);