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



##########
File path: fs/nfs/rpc_clnt.c
##########
@@ -297,20 +297,26 @@ static int rpcclnt_socket(FAR struct rpcclnt *rpc, 
in_port_t rport)
 static int rpcclnt_send(FAR struct rpcclnt *rpc,
                         FAR void *call, int reqlen)
 {
-  uint32_t mark;
   int ret = OK;
 
-  /* Send the record marking(RM) for stream only */
-
   if (rpc->rc_sotype == SOCK_STREAM)
     {
-      mark = txdr_unsigned(0x80000000 | reqlen);
-      ret = psock_send(&rpc->rc_so, &mark, sizeof(mark), 0);
-      if (ret < 0)
-        {
-          ferr("ERROR: psock_send mark failed: %d\n", ret);
-          return ret;
-        }
+      /* Prepare the fragment header for stream only
+       * NOTE: Sending a separate packet does not work with Linux host
+       */
+
+      FAR struct rpc_call_header *ch = (FAR struct rpc_call_header *)call;
+
+      /* NOTE: subtract the fragment header size in the header */
+
+      ch->rp_fh = txdr_unsigned(0x80000000 | (reqlen - 4));

Review comment:
       @xiaoxiang781216 
   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