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

Return correct errno in raspberrypi's Socket.c #7048

Merged
merged 1 commit into from Oct 13, 2022

Conversation

georgboe
Copy link

This PR fixes #6988

Changes seems to have been made in ca9523b to address this, but it is still wrong.

ret is defined as mp_uint_t and is therefore never less than zero, this uses the same solution as line 1060 in the same file.
Also the value in received is now a negative number, and must be converted to a positive number before being raised to match up with errno.ETIMEDOUT and errno.EAGAIN.

@georgboe georgboe changed the title Return correct errno Return correct errno in raspberrypi Socket.c Oct 13, 2022
@georgboe georgboe changed the title Return correct errno in raspberrypi Socket.c Return correct errno in raspberrypi's Socket.c Oct 13, 2022
@dhalbert dhalbert requested a review from jepler October 13, 2022 19:29
@georgboe georgboe marked this pull request as ready for review October 13, 2022 19:30
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks sensible. Clearly my own change lacked clarity and testing. Please ping me when you're ready to take this out of 'draft' status!

@georgboe
Copy link
Author

@jepler Thank you, I have set it as "Ready for review" now.

@dhalbert
Copy link
Collaborator

@jepler Strangely, the CI is building all the espressif boards as well as the raspberrypi boards.

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

Successfully merging this pull request may close these issues.

adafruit_minimqtt produces non-descript error inside _wait_for_msg on Pico W
3 participants