Skip to content

Conversation

@hidmic
Copy link
Contributor

@hidmic hidmic commented Apr 28, 2020

If security support is not required, the lack of it is not an error. I think this was introduced in #145.

Without this patch, if building with ENABLE_SECURITY=off and RCUTILS_REPORT_ERROR_HANDLING_ERRORS set, the error string set in configure_qos_security() is always printed out on any downstream override.

If security support is not required, the lack of it is not an error.

Signed-off-by: Michel Hidalgo <[email protected]>
@hidmic hidmic requested a review from eboasson April 28, 2020 17:45
Copy link
Member

@ivanpauno ivanpauno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just hit the same problem (#123 (comment)).
I've tried this locally and it does work.

LGTM!

return RMW_RET_ERROR;
}
// No security enforced, lack of support is not an error.
rmw_reset_error();
Copy link
Member

@kyrofa kyrofa Apr 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think setting the error state is a bug anyway, fixing it like this feels a tad kludgey. I instead suggest surrounding the generation of the error message with an if (security_options->security_root_path != nullptr). If security_root_path == nullptr I'd just return OK, since nothing was requested and we did nothing.

@SidFaber SidFaber mentioned this pull request Apr 29, 2020
@ivanpauno
Copy link
Member

Closing in favor of #175

@ivanpauno ivanpauno closed this Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants