Skip to content
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

Fix wrong queue size while reading multiple frames. #15

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

SimonCahill
Copy link
Owner

Due to an error on my part, a wrong assumption was made about the behaviour of select().
select() returns the number of read file descriptors, instead of the amount of frames ready to be read.

This bug is a typical case of not noticing it, because it seem(s/ed) to work.

Thank you for reporting this.

The code in this PR is currently untested.

Once tested, fixes issue 14.

Made strings ref-to-const.
Removed useless const qualifier for return values.
Fixed return type mismatches.
Added in-class-initialisers.
waitForMessages() now uses ioctl(FIONREAD) to return the size of the queue.
@SimonCahill SimonCahill added the bug Something isn't working label Mar 3, 2024
@SimonCahill SimonCahill self-assigned this Mar 3, 2024
@SimonCahill SimonCahill linked an issue Mar 3, 2024 that may be closed by this pull request
@SimonCahill SimonCahill merged commit f2463f9 into master Mar 6, 2024
2 checks passed
@SimonCahill SimonCahill deleted the 14-queue-size-in-read branch March 6, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Queue size in read
1 participant