Reset the error on failing to find the C typesupport#274
Merged
clalancette merged 2 commits intomasterfrom Jan 5, 2021
Merged
Conversation
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
The rcutils error_string is meant to be used like errno; it may or may not be set when entering a function, calling other functions may or may not set it, and it is up to the caller on how to handle all of that. make_message_value_type() and make_request_response_value_types() were not resetting the error properly, and so could leave a failure state around. Fix that here by mimicing code that exists elsewhere in rmw_cyclonedds_cpp. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
eboasson
approved these changes
Jan 5, 2021
Collaborator
eboasson
left a comment
There was a problem hiding this comment.
Thanks @clalancette! It looks good to me and it definitely does the trick (ros2/rmw#293 confirmed it).
Contributor
Author
Thanks for the review. I'm going to go ahead and make this a real PR and merge it. We can work on the rest of the failing tests over in ros2/rmw#293 . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The individual commits have more information, but essentially make sure to reset the error in between calls to probing for typesupport. This should fix the bulk of the test failures we are seeing in ros2/rmw#293 .
@eboasson Note that this is different than what we had discussed earlier. After talking to some more people, changing the contract of get_typesupport_handle_function is a little more dangerous than we want to attempt right now . So this is the more targeted, if less ideal, solution. I'll likely still open an issue to follow-up and change that contract, since the current contract seems a bit ugly.
CI for this change is in ros2/rmw#293 .