Skip to content

Commit

Permalink
Set domain id to 0 if it is RMW_DEFAULT_DOMAIN_ID (#719)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
  • Loading branch information
ivanpauno authored Jul 20, 2020
1 parent f172071 commit fd5e56a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rcl/src/rcl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ rcl_init(
goto fail;
}
}
if (RMW_DEFAULT_DOMAIN_ID == *domain_id) {
*domain_id = 0u;
}

rmw_localhost_only_t * localhost_only =
&context->impl->init_options.impl->rmw_init_options.localhost_only;
Expand Down
3 changes: 3 additions & 0 deletions rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ rcl_node_init(
goto fail;
}
}
if (RMW_DEFAULT_DOMAIN_ID == domain_id) {
domain_id = 0u;
}
RCUTILS_LOG_DEBUG_NAMED(ROS_PACKAGE_NAME, "Using domain ID of '%zu'", domain_id);
node->impl->actual_domain_id = domain_id;

Expand Down

0 comments on commit fd5e56a

Please sign in to comment.