Skip to content

MavLinkCom subscriber id may give invalid ids #347

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

Open
ditlef opened this issue Jul 17, 2017 · 2 comments
Open

MavLinkCom subscriber id may give invalid ids #347

ditlef opened this issue Jul 17, 2017 · 2 comments

Comments

@ditlef
Copy link

ditlef commented Jul 17, 2017

The id is: static_cast(listeners.size() + 1)

Subscibe two listeners:
=> L1 = 1, L2 = 2
Unsubscribe L1.
=> L2 is invalid.
Add Subsciption:
=> L3 = 2 (L2 = 2)

@sytelus
Copy link
Contributor

sytelus commented Jul 17, 2017

Thanks for reporting the issue. Looks like bug is in this line. We need to use C++ remove-erase idiom. Please feel free to make a local change and see if that works.

@ditlef
Copy link
Author

ditlef commented Jul 17, 2017 via email

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

No branches or pull requests

3 participants