Browse Source

add lwip_get_error function.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@420 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 years ago
parent
commit
8a0409ab5f
1 changed files with 8 additions and 0 deletions
  1. 8 0
      net/lwip/src/api/sockets.c

+ 8 - 0
net/lwip/src/api/sockets.c

@@ -238,6 +238,14 @@ alloc_socket(struct netconn *newconn)
   return -1;
 }
 
+int lwip_get_error(int s)
+{
+	struct lwip_socket *sock;
+	sock = get_socket(s);
+
+	return sock->err;
+}
+
 /* Below this, the well-known socket functions are implemented.
  * Use google.com or opengroup.org to get a good description :-)
  *