diff options
author | peter <peter@FreeBSD.org> | 1996-12-30 15:28:38 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-12-30 15:28:38 +0000 |
commit | 6b11cf1aa91300d830dc1a774a5a0340d6eb4a8e (patch) | |
tree | b5bd08b4c3998f3a50a5c1bc0fbc34f5299d5ed1 /usr.bin/rusers/rusers.c | |
parent | 5b74bc11b57d2ee42211d4e6b2b99e5fb519d5c6 (diff) | |
download | FreeBSD-src-6b11cf1aa91300d830dc1a774a5a0340d6eb4a8e.zip FreeBSD-src-6b11cf1aa91300d830dc1a774a5a0340d6eb4a8e.tar.gz |
Fix bug found by newly visible function pointer prototypes. This
was passing an int to something expecting a "struct timeval".
I've guessed at a timeout to replace it with..
Diffstat (limited to 'usr.bin/rusers/rusers.c')
-rw-r--r-- | usr.bin/rusers/rusers.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c index 9c72342..2f59b39 100644 --- a/usr.bin/rusers/rusers.c +++ b/usr.bin/rusers/rusers.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: rusers.c,v 1.1.1.1 1994/08/28 15:06:02 csgr Exp $"; +static char rcsid[] = "$Id: rusers.c,v 1.2 1995/05/30 06:33:28 rgrimes Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -170,6 +170,7 @@ onehost(char *host) CLIENT *rusers_clnt; struct sockaddr_in addr; struct hostent *hp; + struct timeval tv; hp = gethostbyname(host); if (hp == NULL) { @@ -185,7 +186,9 @@ onehost(char *host) } bzero((char *)&up, sizeof(up)); - if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, xdr_void, NULL, xdr_utmpidlearr, &up, NULL) != RPC_SUCCESS) { + tv.tv_sec = 15; /* XXX ?? */ + tv.tv_usec = 0; + if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, xdr_void, NULL, xdr_utmpidlearr, &up, tv) != RPC_SUCCESS) { clnt_perror(rusers_clnt, argv0); exit(1); } |