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

Problem with errno and fcntl #845

Closed
nkolban opened this issue Mar 13, 2017 · 2 comments
Closed

Problem with errno and fcntl #845

nkolban opened this issue Mar 13, 2017 · 2 comments
Labels

Comments

@nkolban
Copy link

nkolban commented Mar 13, 2017

If we look at the following code, we see that it checks errno ... however I think there is a problem ...

https://github.com/ARMmbed/mbedtls/blob/master/library/net_sockets.c#L278

What we want to check is errno's value when the function is called. However, what I think we are checking is the errno value from the last fcntl is the same function.

@ciarmcom
Copy link

ARM Internal Ref: IOTSSL-1324

hanno-becker pushed a commit to hanno-becker/mbedtls that referenced this issue May 4, 2017
Safe and restore the value of errno in net_would_block to be sure
it's not affected by the guarding call to fcntl. Fixes Mbed-TLS#845.
hanno-becker pushed a commit to hanno-becker/mbedtls that referenced this issue May 12, 2017
Safe and restore the value of errno in net_would_block to be sure
it's not affected by the guarding call to fcntl. Fixes Mbed-TLS#845.
hanno-becker pushed a commit to hanno-becker/mbedtls that referenced this issue May 12, 2017
Safe and restore the value of errno in net_would_block to be sure
it's not affected by the guarding call to fcntl. Fixes Mbed-TLS#845.
@RonEld
Copy link
Contributor

RonEld commented Sep 10, 2017

duplicate of #733

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

No branches or pull requests

4 participants