api.h, api_lib.c, api_msg.c, sockets.c: group the different NETCONN_UDPxxx code in only one part...

This commit is contained in:
fbernon
2007-05-23 17:46:53 +00:00
parent d1ef610822
commit 953d783a3e
5 changed files with 34 additions and 66 deletions

View File

@@ -1081,7 +1081,7 @@ int lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optl
break;
case SO_TYPE:
switch (sock->conn->type) {
switch (NETCONNTYPE_GROUP(sock->conn->type)) {
case NETCONN_RAW:
*(int*)optval = SOCK_RAW;
break;
@@ -1089,8 +1089,6 @@ int lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optl
*(int*)optval = SOCK_STREAM;
break;
case NETCONN_UDP:
case NETCONN_UDPLITE:
case NETCONN_UDPNOCHKSUM:
*(int*)optval = SOCK_DGRAM;
break;
default: /* unrecognized socket type */