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

Merge pull request #1941 from HubertXie/master

Update at_socket.c
...@@ -668,6 +668,7 @@ int at_recvfrom(int socket, void *mem, size_t len, int flags, struct sockaddr *f ...@@ -668,6 +668,7 @@ int at_recvfrom(int socket, void *mem, size_t len, int flags, struct sockaddr *f
if (rt_sem_take(sock->recv_notice, timeout) < 0) if (rt_sem_take(sock->recv_notice, timeout) < 0)
{ {
LOG_E("AT socket (%d) receive timeout (%d)!", socket, timeout); LOG_E("AT socket (%d) receive timeout (%d)!", socket, timeout);
errno = EAGAIN;
result = -1; result = -1;
goto __exit; goto __exit;
} }
...@@ -699,7 +700,7 @@ __exit: ...@@ -699,7 +700,7 @@ __exit:
{ {
result = recv_len; result = recv_len;
at_do_event_changes(sock, AT_EVENT_RECV, RT_FALSE); at_do_event_changes(sock, AT_EVENT_RECV, RT_FALSE);
errno = 0;
if (!rt_slist_isempty(&sock->recvpkt_list)) if (!rt_slist_isempty(&sock->recvpkt_list))
{ {
at_do_event_changes(sock, AT_EVENT_RECV, RT_TRUE); at_do_event_changes(sock, AT_EVENT_RECV, RT_TRUE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册