diff --git a/rmw_fastrtps_shared_cpp/src/rmw_service_server_is_available.cpp b/rmw_fastrtps_shared_cpp/src/rmw_service_server_is_available.cpp index 8cecfb203..ba17e788c 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_service_server_is_available.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_service_server_is_available.cpp @@ -49,13 +49,18 @@ __rmw_service_server_is_available( RMW_CHECK_TYPE_IDENTIFIERS_MATCH( node handle, node->implementation_identifier, identifier, - return RMW_RET_ERROR); + return RMW_RET_INCORRECT_RMW_IMPLEMENTATION); if (!client) { RMW_SET_ERROR_MSG("client handle is null"); return RMW_RET_ERROR; } + RMW_CHECK_TYPE_IDENTIFIERS_MATCH( + client handle, + client->implementation_identifier, identifier, + return RMW_RET_INCORRECT_RMW_IMPLEMENTATION); + if (!is_available) { RMW_SET_ERROR_MSG("is_available is null"); return RMW_RET_ERROR;