From dc48f0498b829bd66d435d7fbfacc353b479215f Mon Sep 17 00:00:00 2001 From: ivanpauno Date: Fri, 30 Aug 2019 16:56:45 -0300 Subject: [PATCH] Corrected errorgit add * Signed-off-by: ivanpauno --- rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp b/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp index 748f535b9..34d67049c 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp @@ -59,7 +59,7 @@ rmw_ret_t __get_guid_by_name( const char * node_namespace, GUID_t & guid) { auto impl = static_cast(node->data); - if (strcmp(node->name, node_name) == 0) { + if (strcmp(node->name, node_name) == 0 && strcmp(node->namespace_, node_namespace) == 0) { guid = impl->participant->getGuid(); } else { std::set nodes_in_desired_namespace; @@ -81,7 +81,11 @@ rmw_ret_t __get_guid_by_name( }); if (guid_node_pair == impl->listener->discovered_names.end()) { - RMW_SET_ERROR_MSG("Node name not found: ns='%s', name='%s", node_namespace, node_name); + RMW_SET_ERROR_MSG_WITH_FORMAT_STRING( + "Node name not found: ns='%s', name='%s", + node_namespace, + node_name + ); return RMW_RET_NODE_NAME_NON_EXISTENT; } guid = guid_node_pair->first;