-
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
rcl_send_response can return a RCL_RET_CLIENT_INVALID? #78
Comments
Yes, it looks like a copy-n-paste error. Can you please create a PR with the proposed change. But it seems that the current implementations never return this code anyway? @wjwwood |
Definitely a copy-paste bug. That return code is reserved for checking if the service is valid or not. In the publisher code, an equivalent return code is returned if the argument is null, but perhaps that's not the best idea, and should instead return
Currently the node can only be invalid if rcl_shutdown has been called, which is a bit redundant. However, I wanted to build in the notion that a node could have a valid/invalid state separate from the init/shutdown state. A more general issue is that we need to check these states in all functions, and provide |
@dirk-thomas Then I'm going to create a PR that corrects the documentation from @wjwwood By a |
You're right that the node being invalid might be the first concern, but since this this function doesn't take a node as an argument (it is probably held internally by the service) then I think the
That's correct, and by extension |
I created a PR #80 that simply removes the documentation entry. I didn't add the RCL_RET_SERVICE_INVALID return type because I think there's currently no possible check in the function where this return value might be reasonable. But I would recommend to keep this issue open because of the things wjwwood said in his last post. |
@firesurfer actually can you open a new issue for whatever you think needs to be tracked. From my perspective, this can be closed once #80 replaces |
According to the documentation the
rcl_send_response
function can return a RCL_RET_CLIENT_INVALID.Shouldn't this be a RCL_RET_SERVICE_INVALID ?
The text was updated successfully, but these errors were encountered: