summaryrefslogtreecommitdiff
path: root/sunrpc/pmap_rmt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-11-18 11:05:09 +0000
committerUlrich Drepper <drepper@redhat.com>1998-11-18 11:05:09 +0000
commit090ca0002ff8ee4ca425bc6088cc097f46c67626 (patch)
tree6d74050e9ba355a9d91de5251c9f854f8fce4098 /sunrpc/pmap_rmt.c
parent45a9a50e68f58102e86b949527fd0c2bc0abf4ce (diff)
Update.
1998-11-18 Ulrich Drepper <drepper@cygnus.com> * io/Makefile (CFLAGS-ftw.c): Removed. 1998-11-18 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * io/Makefile (tests): Make sure that the test program has an explicit directory part. 1998-11-18 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * configure.in: Fix last change. 1998-11-18 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * sunrpc/Makefile (routines): Add create_xid. * sunrpc/clnt_tcp.c: Use non-guessable xid. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/create_xid.c: New, create non-guessable xid. * sunrpc/svc_tcp.c: Remove patch from 1998-06-15, use poll instead of select. * sunrpc/svc_unix.c: Use poll instead of select.
Diffstat (limited to 'sunrpc/pmap_rmt.c')
-rw-r--r--sunrpc/pmap_rmt.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
index ced817d809..e0f52c9145 100644
--- a/sunrpc/pmap_rmt.c
+++ b/sunrpc/pmap_rmt.c
@@ -56,6 +56,8 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
#include <arpa/inet.h>
#define MAX_BROADCAST_SIZE 1400
+extern u_long _create_xid (void);
+
static struct timeval timeout = {3, 0};
/*
@@ -112,9 +114,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
* written for XDR_ENCODE direction only
*/
bool_t
-xdr_rmtcall_args (xdrs, cap)
- XDR *xdrs;
- struct rmtcallargs *cap;
+xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
{
u_int lenposition, argposition, position;
@@ -237,6 +237,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
AUTH *unix_auth = authunix_create_default ();
XDR xdr_stream;
XDR *xdrs = &xdr_stream;
+ struct timeval t;
int outlen, inlen, nets;
socklen_t fromlen;
int sock;
@@ -252,7 +253,6 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
struct rmtcallargs a;
struct rmtcallres r;
struct rpc_msg msg;
- struct timeval t;
char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE];
/*
@@ -281,8 +281,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
baddr.sin_port = htons (PMAPPORT);
baddr.sin_addr.s_addr = htonl (INADDR_ANY);
/* baddr.sin_addr.S_un.S_addr = htonl(INADDR_ANY); */
- (void) __gettimeofday (&t, (struct timezone *) 0);
- msg.rm_xid = xid = __getpid () ^ t.tv_sec ^ t.tv_usec;
+ msg.rm_xid = xid = _create_xid ();
t.tv_usec = 0;
msg.rm_direction = CALL;
msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;