From f0a30d9b594e33e7e11cdfc46eea6f028f9af4c5 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 30 Dec 1996 15:28:38 +0000 Subject: [PATCH] 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.. --- usr.bin/rusers/rusers.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c index 9c7234239698..2f59b3913bdc 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 @@ -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); }