提交 a2d1f21b 编写于 作者: wuyangyong's avatar wuyangyong

[LWIP] fixed closesocket issues: socket has been closed, delete it from file system fd.

上级 c77cebc4
...@@ -327,6 +327,13 @@ RTM_EXPORT(socket); ...@@ -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);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册