Skip to content

Commit

Permalink
Corrected errorgit add *
Browse files Browse the repository at this point in the history
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
  • Loading branch information
ivanpauno committed Aug 30, 2019
1 parent 9744a6d commit dc48f04
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp
Expand Up @@ -59,7 +59,7 @@ rmw_ret_t __get_guid_by_name(
const char * node_namespace, GUID_t & guid)
{
auto impl = static_cast<CustomParticipantInfo *>(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<GUID_t> nodes_in_desired_namespace;
Expand All @@ -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;
Expand Down

0 comments on commit dc48f04

Please sign in to comment.