From 399a5e4ac2bcad668e37673664fabe29e683efc9 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 30 Dec 1996 15:26:51 +0000 Subject: [PATCH] Fix bug found by newly visible prototypes in rpc. The code was passing an in to a function instead of a "struct timeval". --- usr.bin/rup/rup.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index 8b34618e061..a490b90ce1c 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 @@ -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); }