Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Code in wait function continues to possibly return RMW_RET_OK despite DDS return error #263

Closed
dejanpan opened this issue Oct 28, 2017 · 2 comments

Comments

@dejanpan
Copy link

Bug report

Required Info:

  • Operating System:

    • Ubuntu 16.04
  • Installation type:

(
RMW_SET_ERROR_MSG("Failed to get detach condition from waitset");
)

(
RMW_SET_ERROR_MSG("Failed to get detach condition from waitset");
)

(
RMW_SET_ERROR_MSG("Failed to get detach condition from waitset");
)

(

RMW_SET_ERROR_MSG("Failed to get detach condition from waitset");
)

  • Version or commit hash:
    • see above
  • DDS implementation:
    • RTI Connext
  • Client library (if applicable):
    • NA

Steps to reproduce issue

Quoting @dirk-thomas

After setting the error message the function should return `RMW_RET_ERROR`. The quick fix would be to just add the return statement in the cases it is missing.

The "correct" fix would be to update the structure of the code to store the return value in a value but still perform the other cleanup and only at the very end `return`.

I will provide PR for the quick fix and started an issue for the correct fix.

@dejanpan
Copy link
Author

dejanpan commented Oct 28, 2017

@dirk-thomas here we are also missing a return; right?

@dirk-thomas
Copy link
Member

dirk-thomas commented Oct 30, 2017

here we are also missing a return; right?

@dejanpan Yes, indeed. Since I saw and merged the PR first can you please create a follow up PR for that line. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants