diff options
| author | christos <christos@NetBSD.org> | 2010-02-26 22:44:17 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2010-02-26 22:44:17 +0000 |
| commit | f0e3fdff974fc41f20b01d4ff40117f20184ae87 (patch) | |
| tree | 6360d66fe2788b072539e8f9f5abda09abe89050 /usr.bin | |
| parent | c30b0f26b288d25270d0ccf78ec7737a202ba324 (diff) | |
matt wants the ping timeout to be 1sec
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/eject/am_glue.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/eject/am_glue.c b/usr.bin/eject/am_glue.c index 1535b457c9e..117d367ecd4 100644 --- a/usr.bin/eject/am_glue.c +++ b/usr.bin/eject/am_glue.c @@ -1,4 +1,4 @@ -/* $NetBSD: am_glue.c,v 1.2 2010/02/26 20:18:37 christos Exp $ */ +/* $NetBSD: am_glue.c,v 1.3 2010/02/26 22:44:17 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: am_glue.c,v 1.2 2010/02/26 20:18:37 christos Exp $"); +__RCSID("$NetBSD: am_glue.c,v 1.3 2010/02/26 22:44:17 christos Exp $"); #endif /* not lint */ #ifdef HAVE_CONFIG_H @@ -60,6 +60,7 @@ ping_pmap(void) struct pmap parms; struct sockaddr_in si; int s = -1, rv; + static struct timeval pingtv = { 1, 0 }; (void)memset(&si, 0, sizeof(si)); si.sin_family = AF_INET; @@ -67,7 +68,7 @@ ping_pmap(void) si.sin_addr.s_addr = htonl(INADDR_LOOPBACK); si.sin_port = htons(PMAPPORT); - if ((cl = clntudp_bufcreate(&si, PMAPPROG, PMAPVERS, tv, + if ((cl = clntudp_bufcreate(&si, PMAPPROG, PMAPVERS, pingtv, &s, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE)) == NULL) return -1; @@ -78,7 +79,7 @@ ping_pmap(void) rv = CLNT_CALL(cl, (rpcproc_t)PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap, &parms, - (xdrproc_t)xdr_u_short, &port, tv) == RPC_SUCCESS ? 0 : -1; + (xdrproc_t)xdr_u_short, &port, pingtv) == RPC_SUCCESS ? 0 : -1; CLNT_DESTROY(cl); return rv; |
