aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/rwall
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-12-30 15:30:11 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-12-30 15:30:11 +0000
commit42f84d83237539de3e9c2f1b0b51f1d267c4483b (patch)
tree1803f28acc71534ad7a09552bdb75e2e49cb0921 /usr.bin/rwall
parentf0a30d9b594e33e7e11cdfc46eea6f028f9af4c5 (diff)
downloadsrc-42f84d83237539de3e9c2f1b0b51f1d267c4483b.tar.gz
src-42f84d83237539de3e9c2f1b0b51f1d267c4483b.zip
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.
Notes
Notes: svn path=/head/; revision=21095
Diffstat (limited to 'usr.bin/rwall')
-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 8a2e2b3fa2a5..7c55c2c53454 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.