pass context to wait set (#617)

Signed-off-by: William Woodall <william@osrfoundation.org>
This commit is contained in:
William Woodall 2019-01-24 19:44:07 -08:00 committed by GitHub
parent 99dd0313ab
commit c0a6b474d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -60,9 +60,8 @@ Executor::Executor(const ExecutorArgs & args)
// Store the context for later use. // Store the context for later use.
context_ = args.context; context_ = args.context;
if (rcl_wait_set_init( ret = rcl_wait_set_init(&wait_set_, 0, 2, 0, 0, 0, context_->get_rcl_context().get(), allocator);
&wait_set_, 0, 2, 0, 0, 0, allocator) != RCL_RET_OK) if (RCL_RET_OK != ret) {
{
RCUTILS_LOG_ERROR_NAMED( RCUTILS_LOG_ERROR_NAMED(
"rclcpp", "rclcpp",
"failed to create wait set: %s", rcl_get_error_string().str); "failed to create wait set: %s", rcl_get_error_string().str);

View file

@ -79,6 +79,7 @@ GraphListener::start_if_not_started()
0, // number_of_timers 0, // number_of_timers
0, // number_of_clients 0, // number_of_clients
0, // number_of_services 0, // number_of_services
this->parent_context_->get_rcl_context().get(),
rcl_get_default_allocator()); rcl_get_default_allocator());
if (RCL_RET_OK != ret) { if (RCL_RET_OK != ret) {
throw_from_rcl_error(ret, "failed to initialize wait set"); throw_from_rcl_error(ret, "failed to initialize wait set");