Fixed bug #31170: lwip_setsockopt() does not set socket number

This commit is contained in:
goldsimon 2010-11-20 18:01:01 +00:00
parent d2679e58a6
commit e52730d1fb
2 changed files with 11 additions and 0 deletions

View File

@ -229,6 +229,9 @@ HISTORY
++ Bugfixes:
2010-11-20: Simon Goldschmidt
* sockets.c: Fixed bug #31170: lwip_setsockopt() does not set socket number
2010-11-20: Simon Goldschmidt
* sockets.h: Fixed bug #31304: Changed SHUT_RD, SHUT_WR and SHUT_RDWR to
resemble other stacks.

View File

@ -105,8 +105,10 @@ struct lwip_select_cb {
struct lwip_setgetsockopt_data {
/** socket struct for which to change options */
struct lwip_sock *sock;
#ifdef LWIP_DEBUG
/** socket index for which to change options */
int s;
#endif /* LWIP_DEBUG */
/** level of the option to process */
int level;
/** name of the option to process */
@ -1615,6 +1617,9 @@ lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen)
/* Now do the actual option processing */
data.sock = sock;
#ifdef LWIP_DEBUG
data.s = s;
#endif /* LWIP_DEBUG */
data.level = level;
data.optname = optname;
data.optval = optval;
@ -2022,6 +2027,9 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt
/* Now do the actual option processing */
data.sock = sock;
#ifdef LWIP_DEBUG
data.s = s;
#endif /* LWIP_DEBUG */
data.level = level;
data.optname = optname;
data.optval = (void*)optval;