Store node pointer in publisher and subscription#1015
Store node pointer in publisher and subscription#1015nnmm wants to merge 1 commit intoros2:rollingfrom
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 <nikolai.morin@apex.ai>
|
I will go ahead to close this, see #987 (comment) and #987 (comment) |
fujitatomoya
left a comment
There was a problem hiding this comment.
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.