From: Angus Gratton Date: Fri, 21 Apr 2017 04:24:59 +0000 (+0800) Subject: Merge branch 'bugfix/mbedtls_wrong_errno' into 'master' X-Git-Tag: v2.1-rc1~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c17b16328104d48a822ee9da9be571d535fe072;p=esp-idf Merge branch 'bugfix/mbedtls_wrong_errno' into 'master' mbedtls port: Fix detection of EWOULDBLOCK/EAGAIN with non-blocking sockets Since mbedtls_net_errno is reset by fcntl, it is reset after calling net_would_block, so the call to mbedtls_net_errno in mbedtls_net_recv and mbedtls_net_send will always get back 0. This change propagates the value returned by mbedtls_net_errno up through net_would_block, to allow the correct error value to be used and avoid a redundant call to mbedtls_net_errno. Merges PR #511 https://github.com/espressif/esp-idf/pull/511 See merge request !688 --- 2c17b16328104d48a822ee9da9be571d535fe072