Module Name:    src
Committed By:   christos
Date:           Fri Feb 26 22:44:17 UTC 2010

Modified Files:
        src/usr.bin/eject: am_glue.c

Log Message:
matt wants the ping timeout to be 1sec


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/eject/am_glue.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/eject/am_glue.c
diff -u src/usr.bin/eject/am_glue.c:1.2 src/usr.bin/eject/am_glue.c:1.3
--- src/usr.bin/eject/am_glue.c:1.2	Fri Feb 26 15:18:37 2010
+++ src/usr.bin/eject/am_glue.c	Fri Feb 26 17:44:17 2010
@@ -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;

Reply via email to