summaryrefslogtreecommitdiff
path: root/usr.bin/rup
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-12-30 15:26:51 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-12-30 15:26:51 +0000
commit399a5e4ac2bcad668e37673664fabe29e683efc9 (patch)
tree27486a6efd21dccd0913a0951c75bf63cf890d57 /usr.bin/rup
parent9180f99125d13f6d7554a345e26add56d7d2ff70 (diff)
downloadsrc-test2-399a5e4ac2bcad668e37673664fabe29e683efc9.tar.gz
src-test2-399a5e4ac2bcad668e37673664fabe29e683efc9.zip
Fix bug found by newly visible prototypes in rpc. The code was passing
an in to a function instead of a "struct timeval".
Notes
Notes: svn path=/head/; revision=21093
Diffstat (limited to 'usr.bin/rup')
-rw-r--r--usr.bin/rup/rup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c
index 8b34618e0619..a490b90ce1c8 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);
}