aboutsummaryrefslogtreecommitdiff
path: root/py/mperrno.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-06-04 12:30:41 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-06-04 12:30:41 +0300
commit5da8de2b66d3f43107e1e745afa9bb6a4bf601eb (patch)
treed981fc5239deb6e6fe841d9add2c69530b5b0299 /py/mperrno.h
parenta0dbbbebb8c0286e00ae06751b0173cbca4ec801 (diff)
extmod/modlwip: Fix error codes for duplicate calls to connect().
If socket is already connected, POSIX requires returning EISCONN. If connection was requested, but not yet complete (for non-blocking socket), error code is EALREADY. http://pubs.opengroup.org/onlinepubs/7908799/xns/connect.html
Diffstat (limited to 'py/mperrno.h')
-rw-r--r--py/mperrno.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mperrno.h b/py/mperrno.h
index 4d092de45..6ea99ae22 100644
--- a/py/mperrno.h
+++ b/py/mperrno.h
@@ -73,6 +73,7 @@
#define MP_ECONNABORTED (103) // Software caused connection abort
#define MP_ECONNRESET (104) // Connection reset by peer
#define MP_ENOBUFS (105) // No buffer space available
+#define MP_EISCONN (106) // Transport endpoint is already connected
#define MP_ENOTCONN (107) // Transport endpoint is not connected
#define MP_ETIMEDOUT (110) // Connection timed out
#define MP_ECONNREFUSED (111) // Connection refused
@@ -127,6 +128,7 @@
#define MP_ECONNABORTED ECONNABORTED
#define MP_ECONNRESET ECONNRESET
#define MP_ENOBUFS ENOBUFS
+#define MP_EISCONN EISCONN
#define MP_ENOTCONN ENOTCONN
#define MP_ETIMEDOUT ETIMEDOUT
#define MP_ECONNREFUSED ECONNREFUSED