From d793ed3b9bd2acc7191922c2d69f4ce5cac31436 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 13 Mar 2011 11:21:06 +0000 Subject: [PATCH] fixed bug #32769 (ESHUTDOWN is linux-specific) by fixing err_to_errno_table (ERR_CLSD: ENOTCONN instead of ESHUTDOWN), ERR_ISCONN: use EALRADY instead of -1 --- CHANGELOG | 14 ++++++++++++++ src/api/sockets.c | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b054f100..475a10cc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -233,6 +233,20 @@ HISTORY ++ Bugfixes: + 2011-03-13: Simon Goldschmidt + * sockets.c: fixed bug #32769 (ESHUTDOWN is linux-specific) by fixing + err_to_errno_table (ERR_CLSD: ENOTCONN instead of ESHUTDOWN), ERR_ISCONN: + use EALRADY instead of -1 + + 2011-03-13: Simon Goldschmidt + * api_lib.c: netconn_accept: return ERR_ABRT instead of ERR_CLSD if the + connection has been aborted by err_tcp (since this is not a normal closing + procedure). + + 2011-03-13: Simon Goldschmidt + * tcp.c: tcp_bind: return ERR_VAL instead of ERR_ISCONN when trying to bind + with pcb->state != CLOSED + 2011-02-17: Simon Goldschmidt * rawapi.txt: Fixed bug #32561 tcp_poll argument definition out-of-order in documentation diff --git a/src/api/sockets.c b/src/api/sockets.c index f3afd630..2b2fe604 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -143,12 +143,12 @@ static const int err_to_errno_table[] = { EWOULDBLOCK, /* ERR_WOULDBLOCK -7 Operation would block. */ ECONNABORTED, /* ERR_ABRT -8 Connection aborted. */ ECONNRESET, /* ERR_RST -9 Connection reset. */ - ESHUTDOWN, /* ERR_CLSD -10 Connection closed. */ + ENOTCONN, /* ERR_CLSD -10 Connection closed. */ ENOTCONN, /* ERR_CONN -11 Not connected. */ EIO, /* ERR_ARG -12 Illegal argument. */ EADDRINUSE, /* ERR_USE -13 Address in use. */ -1, /* ERR_IF -14 Low-level netif error */ - -1, /* ERR_ISCONN -15 Already connected. */ + EALREADY, /* ERR_ISCONN -15 Already connected. */ }; #define ERR_TO_ERRNO_TABLE_SIZE \