Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/eject matt wants the ping timeout to be 1sec



details:   https://anonhg.NetBSD.org/src/rev/1da73b81b519
branches:  trunk
changeset: 752464:1da73b81b519
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 26 22:44:17 2010 +0000

description:
matt wants the ping timeout to be 1sec

diffstat:

 usr.bin/eject/am_glue.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 351e0b278b57 -r 1da73b81b519 usr.bin/eject/am_glue.c
--- a/usr.bin/eject/am_glue.c   Fri Feb 26 22:24:07 2010 +0000
+++ b/usr.bin/eject/am_glue.c   Fri Feb 26 22:44:17 2010 +0000
@@ -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 @@
        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 @@
        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 @@
 
        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;



Home | Main Index | Thread Index | Old Index