masayuki2009 commented on a change in pull request #3707:
URL: https://github.com/apache/incubator-nuttx/pull/3707#discussion_r632127702



##########
File path: fs/nfs/rpc_clnt.c
##########
@@ -371,13 +395,22 @@ static int rpcclnt_receive(FAR struct rpcclnt *rpc,
       resplen = mark;
     }
 
-  error = psock_recv(&rpc->rc_so, reply, resplen, 0);
+repeat:
+  error = psock_recv(&rpc->rc_so, reply + offset, resplen, 0);
   if (error < 0)
     {
       ferr("ERROR: psock_recv response failed: %d\n", error);
       return error;
     }
 
+  resplen -= error;
+  offset  += error;
+
+  if (rpc->rc_sotype == SOCK_STREAM && resplen)
+    {
+      goto repeat;
+    }

Review comment:
       @gustavonihei 
   
   Thanks for the suggestion.
   I will change the code based on the 
https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#dowhile




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to