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:
Michael Jung 2018-05-02 13:53:51 -06:00 committed by Gregory Nutt
parent d2def725d9
commit 800da58e6c

View file

@ -1,7 +1,7 @@
/****************************************************************************
* 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.
* Author: Jose Pablo Rojas Vargas <jrojas@nx-engineering.com>
* 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
*
* 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.
*/
nbytes = psock_sendto(rpc->rc_so, call, reqlen, 0,
rpc->rc_name, sizeof(struct sockaddr));
nbytes = psock_send(rpc->rc_so, call, reqlen, 0);
if (nbytes < 0)
{
/* psock_sendto failed */
@ -457,9 +457,9 @@ int rpcclnt_connect(struct rpcclnt *rpc)
goto bad;
}
/* Protocols that do not require connections may be optionally left
* unconnected for servers that reply from a port other than
* NFS_PORT.
/* Protocols that do not require connections could be optionally left
* unconnected. That would allow servers to reply from a port other than
* the NFS_PORT.
*/
error = psock_connect(rpc->rc_so, saddr, sizeof(*saddr));