-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store node pointer in publisher and subscription #1015
base: rolling
Are you sure you want to change the base?
Store node pointer in publisher and subscription #1015
Conversation
The rcl_publisher_fini() and rcl_subscription_fini() functions now check that the correct node was given to it. A new error code, RCL_RET_INCORRECT_NODE, is returned on node mismatch Signed-off-by: Nikolai Morin <[email protected]>
I will go ahead to close this, see #987 (comment) and #987 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, all comments posted on #987
@iuhilnehc-ynos can you take another review on this? i believe that node argument to fini function is by contract to make it clear, we are not removing this. but extra check makes sense to me. thanks, |
Storing the node pointer in publisher and subscription just to only check if the node pointer is correct or not in I believe that not storing the |
I see that one of the design, but node and publisher / subscription are not exactly decoupled. or are you suggesting something else? |
This is the successor of #987.
By storing the node pointer in the publisher and subscription, it is possible to check for the correct node pointer being passed to
rcl_publisher_fini()
andrcl_subscription_fini()
. This PR also adds a new return code for this purpose.