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
commit e59aa648b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

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);
}
}

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;
}

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;
}
@ -698,8 +697,7 @@ int sal_closesocket(int socket)
if (sock->ops->closesocket((int) sock->user_data) == 0)
{
rt_free(sock);
sock = RT_NULL;
socket_table.sockets[socket] = RT_NULL;
return 0;
}