Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rmw_get_default_xxx to return the structure with default values. #1186

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rcl/src/rcl/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ rcl_publisher_event_init(
RCL_CHECK_FOR_NULL_WITH_MSG(
event->impl, "allocating memory failed", return RCL_RET_BAD_ALLOC);

event->impl->rmw_handle = rmw_get_zero_initialized_event();
event->impl->rmw_handle = rmw_get_default_event();
event->impl->allocator = *allocator;

rmw_ret_t ret = rmw_publisher_event_init(
Expand Down Expand Up @@ -141,7 +141,7 @@ rcl_subscription_event_init(
RCL_CHECK_FOR_NULL_WITH_MSG(
event->impl, "allocating memory failed", return RCL_RET_BAD_ALLOC);

event->impl->rmw_handle = rmw_get_zero_initialized_event();
event->impl->rmw_handle = rmw_get_default_event();
event->impl->allocator = *allocator;

rmw_ret_t ret = rmw_subscription_event_init(
Expand Down
2 changes: 1 addition & 1 deletion rcl/src/rcl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ rcl_init(
context->impl, "failed to allocate memory for context impl", return RCL_RET_BAD_ALLOC);

// Zero initialize rmw context first so its validity can by checked in cleanup.
context->impl->rmw_context = rmw_get_zero_initialized_context();
context->impl->rmw_context = rmw_get_default_context();

// Store the allocator.
context->impl->allocator = allocator;
Expand Down
2 changes: 1 addition & 1 deletion rcl/src/rcl/init_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ _rcl_init_options_zero_init(rcl_init_options_t * init_options, rcl_allocator_t a
"failed to allocate memory for init options impl",
return RCL_RET_BAD_ALLOC);
init_options->impl->allocator = allocator;
init_options->impl->rmw_init_options = rmw_get_zero_initialized_init_options();
init_options->impl->rmw_init_options = rmw_get_default_init_options();

return RCL_RET_OK;
}
Expand Down