[LWIP] fixed closesocket issues: socket has been closed, delete it from file system fd.
This commit is contained in:
parent
c77cebc4c0
commit
a2d1f21b43
|
@ -327,6 +327,13 @@ RTM_EXPORT(socket);
|
||||||
int closesocket(int s)
|
int closesocket(int s)
|
||||||
{
|
{
|
||||||
int sock = dfs_net_getsocket(s);
|
int sock = dfs_net_getsocket(s);
|
||||||
|
struct dfs_fd *d;
|
||||||
|
|
||||||
|
d = fd_get(s);
|
||||||
|
|
||||||
|
/* socket has been closed, delete it from file system fd */
|
||||||
|
fd_put(d);
|
||||||
|
fd_put(d);
|
||||||
|
|
||||||
return lwip_close(sock);
|
return lwip_close(sock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue