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



##########
File path: fs/nfs/rpc_clnt.c
##########
@@ -241,6 +241,11 @@ static int rpcclnt_socket(FAR struct rpcclnt *rpc, 
in_port_t rport)
       goto bad;
     }
 
+  if (rpc->rc_sotype == SOCK_STREAM)
+    {
+      goto connect;

Review comment:
       Done
   

##########
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:
       Done
   




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