From f1c55df3879eb0776a623d8685d502bd6edf5ecc Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 6 Jan 2002 20:18:19 +0000 Subject: [PATCH] Now that the sppp driver has a payload based timestamp, use that to calculate ISDN timeouts as well. Now LCP echo request/replies won't keep the connection open any more. --- sys/netisdn/i4b_isppp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netisdn/i4b_isppp.c b/sys/netisdn/i4b_isppp.c index 1b65fd1b418d..0bfce7714233 100644 --- a/sys/netisdn/i4b_isppp.c +++ b/sys/netisdn/i4b_isppp.c @@ -34,7 +34,7 @@ * the "cx" driver for Cronyx's HDLC-in-hardware device). This driver * is only the glue between sppp and i4b. * - * $Id: i4b_isppp.c,v 1.9 2002/01/06 13:26:46 martin Exp $ + * $Id: i4b_isppp.c,v 1.10 2002/01/06 20:18:19 martin Exp $ * * $FreeBSD$ * @@ -43,7 +43,7 @@ *---------------------------------------------------------------------------*/ #include -__KERNEL_RCSID(0, "$NetBSD: i4b_isppp.c,v 1.9 2002/01/06 13:26:46 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i4b_isppp.c,v 1.10 2002/01/06 20:18:19 martin Exp $"); #ifndef __NetBSD__ #define USE_ISPPP @@ -727,12 +727,12 @@ i4bisppp_tx_queue_empty(int unit) time_t i4bisppp_idletime(int unit) { -#ifdef __NetBSD__ - return(i4bisppp_softc[unit].sc_cdp->last_active_time); -#else struct sppp *sp; sp = (struct sppp *) &i4bisppp_softc[unit]; +#ifdef __NetBSD__ + return sp->pp_last_activity; +#else return((sp->pp_last_recv < sp->pp_last_sent) ? sp->pp_last_sent : sp->pp_last_recv); #endif