未验证 提交 e59aa648 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1798 from HubertXie/master

Update sal_socket.c
...@@ -248,7 +248,7 @@ static void at_do_event_changes(struct at_socket *sock, at_event_t event, rt_boo ...@@ -248,7 +248,7 @@ static void at_do_event_changes(struct at_socket *sock, at_event_t event, rt_boo
break; break;
} }
default: default:
LOG_E("Not supported event (%d)", event) LOG_E("Not supported event (%d)", event);
} }
} }
......
...@@ -748,7 +748,7 @@ static int at_client_para_init(at_client_t client) ...@@ -748,7 +748,7 @@ static int at_client_para_init(at_client_t client)
client->recv_buffer = (char *) rt_calloc(1, client->recv_bufsz); client->recv_buffer = (char *) rt_calloc(1, client->recv_bufsz);
if (client->recv_buffer == RT_NULL) if (client->recv_buffer == RT_NULL)
{ {
LOG_E("AT client initialize failed! No memory for receive buffer.") LOG_E("AT client initialize failed! No memory for receive buffer.");
result = -RT_ENOMEM; result = -RT_ENOMEM;
goto __exit; goto __exit;
} }
......
...@@ -489,8 +489,7 @@ int sal_shutdown(int socket, int how) ...@@ -489,8 +489,7 @@ int sal_shutdown(int socket, int how)
if (sock->ops->shutdown((int) sock->user_data, how) == 0) if (sock->ops->shutdown((int) sock->user_data, how) == 0)
{ {
rt_free(sock); rt_free(sock);
sock = RT_NULL; socket_table.sockets[socket] = RT_NULL;
return 0; return 0;
} }
...@@ -697,9 +696,8 @@ int sal_closesocket(int socket) ...@@ -697,9 +696,8 @@ int sal_closesocket(int socket)
if (sock->ops->closesocket((int) sock->user_data) == 0) if (sock->ops->closesocket((int) sock->user_data) == 0)
{ {
rt_free(sock); rt_free(sock);
sock = RT_NULL; socket_table.sockets[socket] = RT_NULL;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册