diff options
author | peter <peter@FreeBSD.org> | 1996-12-30 15:26:51 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-12-30 15:26:51 +0000 |
commit | 5b74bc11b57d2ee42211d4e6b2b99e5fb519d5c6 (patch) | |
tree | 27486a6efd21dccd0913a0951c75bf63cf890d57 /usr.bin/rup | |
parent | 03abde609a6b94b24f880ca8f111eab539fdbfb7 (diff) | |
download | FreeBSD-src-5b74bc11b57d2ee42211d4e6b2b99e5fb519d5c6.zip FreeBSD-src-5b74bc11b57d2ee42211d4e6b2b99e5fb519d5c6.tar.gz |
Fix bug found by newly visible prototypes in rpc. The code was passing
an in to a function instead of a "struct timeval".
Diffstat (limited to 'usr.bin/rup')
-rw-r--r-- | usr.bin/rup/rup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index 8b34618e..a490b90 100644 --- a/usr.bin/rup/rup.c +++ b/usr.bin/rup/rup.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: rup.c,v 1.4 1995/11/21 05:43:27 wpaul Exp $"; #endif /* not lint */ #include <stdio.h> @@ -156,6 +156,7 @@ onehost(char *host) statstime host_stat; struct sockaddr_in addr; struct hostent *hp; + struct timeval tv; hp = gethostbyname(host); if (hp == NULL) { @@ -171,7 +172,9 @@ onehost(char *host) } bzero((char *)&host_stat, sizeof(host_stat)); - if (clnt_call(rstat_clnt, RSTATPROC_STATS, xdr_void, NULL, xdr_statstime, &host_stat, NULL) != RPC_SUCCESS) { + tv.tv_sec = 15; /* XXX ??? */ + tv.tv_usec = 0; + if (clnt_call(rstat_clnt, RSTATPROC_STATS, xdr_void, NULL, xdr_statstime, &host_stat, tv) != RPC_SUCCESS) { fprintf(stderr, "%s: %s: %s\n", argv0, host, clnt_sperror(rstat_clnt, host)); return(-1); } |