4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 15:43:32 +08:00

Merge pull request #992 from SummerGGift/1013_patch_2

[lwIP] add lwip_tryget_socket API in lwIP 1.4.1.
This commit is contained in:
Bernard Xiong 2017-11-13 21:09:19 +08:00 committed by GitHub
commit 338835f932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,6 +231,19 @@ tryget_socket(int s)
return &sockets[s]; return &sockets[s];
} }
/**
* Same as tryget_socket but a global routine.
*
* @param s externally used socket index
* @return struct lwip_sock for the socket or NULL if not found
*/
struct lwip_sock *
lwip_tryget_socket(int s)
{
return tryget_socket(s);
}
/** /**
* Allocate a new socket for a given netconn. * Allocate a new socket for a given netconn.
* *