From d2679e58a686159f1ab0b1a4b47c17ff17f54ecb Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sat, 20 Nov 2010 17:48:10 +0000 Subject: [PATCH] Fixed bug #31304: Changed SHUT_RD, SHUT_WR and SHUT_RDWR to resemble other stacks. --- CHANGELOG | 4 ++++ src/include/lwip/api_msg.h | 3 ++- src/include/lwip/sockets.h | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0ce03086..5d4e4f2b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -229,6 +229,10 @@ HISTORY ++ Bugfixes: + 2010-11-20: Simon Goldschmidt + * sockets.h: Fixed bug #31304: Changed SHUT_RD, SHUT_WR and SHUT_RDWR to + resemble other stacks. + 2010-11-20: Simon Goldschmidt * dns.c: Fixed bug #31535: TCP_SND_QUEUELEN must be at least 2 or else no-copy TCP writes will never succeed. diff --git a/src/include/lwip/api_msg.h b/src/include/lwip/api_msg.h index ccb1015f..f99d8c3b 100644 --- a/src/include/lwip/api_msg.h +++ b/src/include/lwip/api_msg.h @@ -48,9 +48,10 @@ extern "C" { #endif +/* For the netconn API, these values are use as a bitmask! */ #define NETCONN_SHUT_RD 1 #define NETCONN_SHUT_WR 2 -#define NETCONN_SHUT_RDWR 3 +#define NETCONN_SHUT_RDWR (NETCONN_SHUT_RD | NETCONN_SHUT_WR) /* IP addresses and port numbers are expected to be in * the same byte order as in the corresponding pcb. diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h index 93c8c11f..3c8fed24 100644 --- a/src/include/lwip/sockets.h +++ b/src/include/lwip/sockets.h @@ -280,9 +280,9 @@ typedef struct ip_mreq { #endif #ifndef SHUT_RD - #define SHUT_RD 1 - #define SHUT_WR 2 - #define SHUT_RDWR 3 + #define SHUT_RD 0 + #define SHUT_WR 1 + #define SHUT_RDWR 2 #endif /* FD_SET used for lwip_select */