Merge pull request #1798 from HubertXie/master

Update sal_socket.c
This commit is contained in:
Bernard Xiong
2018-09-12 15:37:59 +08:00
committed by GitHub
3 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -248,7 +248,7 @@ static void at_do_event_changes(struct at_socket *sock, at_event_t event, rt_boo
break;
}
default:
LOG_E("Not supported event (%d)", event)
LOG_E("Not supported event (%d)", event);
}
}
+1 -1
View File
@@ -748,7 +748,7 @@ static int at_client_para_init(at_client_t client)
client->recv_buffer = (char *) rt_calloc(1, client->recv_bufsz);
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;
goto __exit;
}
+3 -5
View File
@@ -489,8 +489,7 @@ int sal_shutdown(int socket, int how)
if (sock->ops->shutdown((int) sock->user_data, how) == 0)
{
rt_free(sock);
sock = RT_NULL;
socket_table.sockets[socket] = RT_NULL;
return 0;
}
@@ -697,9 +696,8 @@ int sal_closesocket(int socket)
if (sock->ops->closesocket((int) sock->user_data) == 0)
{
rt_free(sock);
sock = RT_NULL;
rt_free(sock);
socket_table.sockets[socket] = RT_NULL;
return 0;
}