mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
fs/nfs/rpc_clnt.c: Commit 091e3f7 broke the NFS client. sendto() can (correctly) no lnoger by used with a connected UDP socket. In that case, send() must be used instead.
This commit is contained in:
committed by
Gregory Nutt
parent
d2def725d9
commit
800da58e6c
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* fs/nfs/rpc_clnt.c
|
* fs/nfs/rpc_clnt.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012-2013, 2018 Gregory Nutt. All rights reserved.
|
||||||
* Copyright (C) 2012 Jose Pablo Rojas Vargas. All rights reserved.
|
* Copyright (C) 2012 Jose Pablo Rojas Vargas. All rights reserved.
|
||||||
* Author: Jose Pablo Rojas Vargas <jrojas@nx-engineering.com>
|
* Author: Jose Pablo Rojas Vargas <jrojas@nx-engineering.com>
|
||||||
* Gregory Nutt <gnutt@nuttx.org>
|
* Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -166,12 +166,12 @@ static int rpcclnt_send(FAR struct rpcclnt *rpc, int procid, int prog,
|
|||||||
|
|
||||||
/* Send the call message
|
/* Send the call message
|
||||||
*
|
*
|
||||||
* On success, psock_sendto returns the number of bytes sent;
|
* On success, psock_send returns the number of bytes sent;
|
||||||
* On failure, it returns a negated errno value.
|
* On failure, it returns a negated errno value.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nbytes = psock_sendto(rpc->rc_so, call, reqlen, 0,
|
nbytes = psock_send(rpc->rc_so, call, reqlen, 0);
|
||||||
rpc->rc_name, sizeof(struct sockaddr));
|
|
||||||
if (nbytes < 0)
|
if (nbytes < 0)
|
||||||
{
|
{
|
||||||
/* psock_sendto failed */
|
/* psock_sendto failed */
|
||||||
@@ -457,9 +457,9 @@ int rpcclnt_connect(struct rpcclnt *rpc)
|
|||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Protocols that do not require connections may be optionally left
|
/* Protocols that do not require connections could be optionally left
|
||||||
* unconnected for servers that reply from a port other than
|
* unconnected. That would allow servers to reply from a port other than
|
||||||
* NFS_PORT.
|
* the NFS_PORT.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
error = psock_connect(rpc->rc_so, saddr, sizeof(*saddr));
|
error = psock_connect(rpc->rc_so, saddr, sizeof(*saddr));
|
||||||
|
|||||||
Reference in New Issue
Block a user