summaryrefslogtreecommitdiffstats
path: root/usr.bin/rwall/rwall.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-12-30 15:30:11 +0000
committerpeter <peter@FreeBSD.org>1996-12-30 15:30:11 +0000
commitbaa49ed6a9f5461f786886c95b773cc8fd6fb2ae (patch)
tree1803f28acc71534ad7a09552bdb75e2e49cb0921 /usr.bin/rwall/rwall.c
parent6b11cf1aa91300d830dc1a774a5a0340d6eb4a8e (diff)
downloadFreeBSD-src-baa49ed6a9f5461f786886c95b773cc8fd6fb2ae.zip
FreeBSD-src-baa49ed6a9f5461f786886c95b773cc8fd6fb2ae.tar.gz
Fix bug found by new prototypes. The code was passing an int to a function
that was expecting a "struct timeval" on the stack. I've guessed at a suitable replacement timeout.
Diffstat (limited to 'usr.bin/rwall/rwall.c')
-rw-r--r--usr.bin/rwall/rwall.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/rwall/rwall.c b/usr.bin/rwall/rwall.c
index 8a2e2b3..7c55c2c 100644
--- a/usr.bin/rwall/rwall.c
+++ b/usr.bin/rwall/rwall.c
@@ -40,7 +40,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)wall.c 5.14 (Berkeley) 3/2/91";*/
-static char rcsid[] = "$Id: rwall.c,v 1.1.1.1 1994/08/28 15:11:02 csgr Exp $";
+static char rcsid[] = "$Id: rwall.c,v 1.2 1995/05/30 06:33:30 rgrimes Exp $";
#endif /* not lint */
/*
@@ -71,6 +71,7 @@ main(argc, argv)
{
char *wallhost, res;
CLIENT *cl;
+ struct timeval tv;
if ((argc < 2) || (argc > 3)) {
fprintf(stderr, "usage: %s hostname [file]\n", argv[0]);
@@ -96,7 +97,9 @@ main(argc, argv)
exit(1);
}
- if (clnt_call(cl, WALLPROC_WALL, xdr_wrapstring, &mbuf, xdr_void, &res, NULL) != RPC_SUCCESS) {
+ tv.tv_sec = 15; /* XXX ?? */
+ tv.tv_usec = 0;
+ if (clnt_call(cl, WALLPROC_WALL, xdr_wrapstring, &mbuf, xdr_void, &res, tv) != RPC_SUCCESS) {
/*
* An error occurred while calling the server.
* Print error message and die.
OpenPOWER on IntegriCloud