xiaoxiang781216 commented on code in PR #7286:
URL: https://github.com/apache/incubator-nuttx/pull/7286#discussion_r992627598


##########
net/tcp/tcp_recvfrom.c:
##########
@@ -706,7 +706,8 @@ ssize_t psock_tcp_recvfrom(FAR struct socket *psock, FAR 
struct msghdr *msg,
    *    want for more because there may be no timeout).
    */
 
-  if (state.ir_recvlen == 0 && state.ir_buflen > 0)
+  if (((flags & MSG_WAITALL) != 0 || state.ir_recvlen == 0) &&

Review Comment:
   need change line 415 too



##########
net/tcp/tcp_recvfrom.c:
##########
@@ -706,7 +706,8 @@ ssize_t psock_tcp_recvfrom(FAR struct socket *psock, FAR 
struct msghdr *msg,
    *    want for more because there may be no timeout).
    */
 
-  if (state.ir_recvlen == 0 && state.ir_buflen > 0)
+  if (((flags & MSG_WAITALL) != 0 || state.ir_recvlen == 0) &&

Review Comment:
   if some bytes receive, we shouldn't return error at line 730 and 740



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to