From a55c9cb605f164d982310670d737e5e3a131ab83 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Tue, 24 Sep 2019 20:58:48 +0200 Subject: [PATCH] Use RMW_RET_NODE_NAME_NON_EXISTENT only if defined Signed-off-by: Erik Boasson --- rmw_cyclonedds_cpp/src/rmw_node.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rmw_cyclonedds_cpp/src/rmw_node.cpp b/rmw_cyclonedds_cpp/src/rmw_node.cpp index 6e75879..5987a70 100755 --- a/rmw_cyclonedds_cpp/src/rmw_node.cpp +++ b/rmw_cyclonedds_cpp/src/rmw_node.cpp @@ -2442,9 +2442,14 @@ static rmw_ret_t get_node_guids( if (ret != RMW_RET_OK) { return ret; } else if (guids.size() == 0) { - /* It appears the get_..._by_node operations are supposed to return NODE_NAME_NON_EXISTENT - if no such node exists */ + /* It appears the get_..._by_node operations are supposed to return + NODE_NAME_NON_EXISTENT (newly introduced in Eloquent) or ERROR + (on Dashing and earlier) if no such node exists */ +#ifdef RMW_RET_NODE_NAME_NON_EXISTENT return RMW_RET_NODE_NAME_NON_EXISTENT; +#else + return RMW_RET_ERROR; +#endif } else { return RMW_RET_OK; }