Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Add missing namespace to the list when getting node names
Browse files Browse the repository at this point in the history
Fixes a bug introduced in #362.

Signed-off-by: Jacob Perron <[email protected]>
  • Loading branch information
jacobperron committed Jan 16, 2020
1 parent 184f6d2 commit a279d4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rmw_connext_shared_cpp/src/node_names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ get_node_names(
final_ret = rmw_convert_rcutils_ret_to_rmw_ret(rcutils_ret);
goto cleanup;
}
tmp_namespaces_list.data[0] = rcutils_strdup(node->namespace_, allocator);
if (!tmp_namespaces_list.data[0]) {
RMW_SET_ERROR_MSG("could not allocate memory for a node namespace");
final_ret = rmw_convert_rcutils_ret_to_rmw_ret(rcutils_ret);
goto cleanup;
}

for (auto i = 1; i < length; ++i) {
DDS::ParticipantBuiltinTopicData pbtd;
Expand Down

0 comments on commit a279d4a

Please sign in to comment.