gustavonihei commented on a change in pull request #3707:
URL: https://github.com/apache/incubator-nuttx/pull/3707#discussion_r632142229
##########
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
@masayuki2009 I didn't notice I gave a non-compliant suggestion! :rofl:
Thanks for pointing out!
--
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]