From 8a0409ab5f6f4aecd657d1dbbf6adaac0c13e0de Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Thu, 18 Feb 2010 04:04:38 +0000 Subject: [PATCH] add lwip_get_error function. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@420 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- net/lwip/src/api/sockets.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/lwip/src/api/sockets.c b/net/lwip/src/api/sockets.c index 36df4d8960..fc56fb465e 100644 --- a/net/lwip/src/api/sockets.c +++ b/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 :-) *