process_cancel_request no longer changes goal state (#341)

This commit is contained in:
Shane Loretz 2018-11-27 15:05:38 -08:00 committed by GitHub
parent f531f682ea
commit 15ac20738c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View file

@ -678,15 +678,12 @@ rcl_action_process_cancel_request(
goto cleanup;
}
// Transition goals to canceling and add to response
// Add goal info to output struct
rcl_action_goal_handle_t * goal_handle;
for (size_t i = 0u; i < num_goals_to_cancel; ++i) {
goal_handle = goal_handles_to_cancel[i];
ret = rcl_action_update_goal_state(goal_handle, GOAL_EVENT_CANCEL);
if (RCL_RET_OK == ret) {
ret = rcl_action_goal_handle_get_info(
goal_handle, &cancel_response->msg.goals_canceling.data[i]);
}
ret = rcl_action_goal_handle_get_info(
goal_handle, &cancel_response->msg.goals_canceling.data[i]);
if (RCL_RET_OK != ret) {
ret_final = RCL_RET_ERROR; // error already set
}