Skip to content

Commit

Permalink
Fix error messages being overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
achim-k committed Apr 5, 2023
1 parent c9a7b49 commit c905c1e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@ rcl_ret_t rcl_node_type_description_service_init(rcl_node_t * node)
RCL_CHECK_ARGUMENT_FOR_NULL(node->impl, RCL_RET_NODE_INVALID);

if (rcl_service_is_valid(&node->impl->get_type_description_service)) {
RCL_SET_ERROR_MSG("Service already initialized");
return RCL_RET_ALREADY_INIT;
}
rcl_reset_error(); // Reset the error message set by rcl_service_is_valid()
Expand Down Expand Up @@ -719,7 +718,7 @@ rcl_ret_t rcl_node_type_description_service_fini(rcl_node_t * node)
RCL_CHECK_ARGUMENT_FOR_NULL(node, RCL_RET_INVALID_ARGUMENT);
RCL_CHECK_ARGUMENT_FOR_NULL(node->impl, RCL_RET_NODE_INVALID);
if (!rcl_service_is_valid(&node->impl->get_type_description_service)) {
RCL_SET_ERROR_MSG("Service not initialized");
rcl_reset_error();
return RCL_RET_NOT_INIT;
}

Expand Down

0 comments on commit c905c1e

Please sign in to comment.