From: brian Date: Sun, 2 Apr 2000 01:36:22 +0000 (+0000) Subject: Don't wait for the redial timer before exiting due to the last X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=075518a60f8cd55c521d006fa1024fad7bc7684c;p=openbsd Don't wait for the redial timer before exiting due to the last background/direct link closing. --- diff --git a/usr.sbin/ppp/ppp/datalink.c b/usr.sbin/ppp/ppp/datalink.c index 1e4436cf887..cb99d2b769c 100644 --- a/usr.sbin/ppp/ppp/datalink.c +++ b/usr.sbin/ppp/ppp/datalink.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: datalink.c,v 1.28 2000/02/27 01:38:25 brian Exp $ + * $OpenBSD: datalink.c,v 1.29 2000/04/02 01:36:22 brian Exp $ */ #include @@ -157,7 +157,8 @@ datalink_HangupDone(struct datalink *dl) dl->dial.incs = 0; dl->reconnect_tries = 0; bundle_LinkClosed(dl->bundle, dl); - if (!dl->bundle->CleaningUp) + if (!dl->bundle->CleaningUp && + !(dl->physical->type & (PHYS_DIRECT|PHYS_BACKGROUND|PHYS_FOREGROUND))) datalink_StartDialTimer(dl, datalink_GetDialTimeout(dl)); } else { datalink_NewState(dl, DATALINK_OPENING); diff --git a/usr.sbin/ppp/ppp/main.c b/usr.sbin/ppp/ppp/main.c index 3d9993a5d6d..5b4c19bc411 100644 --- a/usr.sbin/ppp/ppp/main.c +++ b/usr.sbin/ppp/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $OpenBSD: main.c,v 1.18 2000/02/27 01:38:27 brian Exp $ + * $OpenBSD: main.c,v 1.19 2000/04/02 01:36:22 brian Exp $ * * TODO: */ @@ -519,6 +519,7 @@ DoLoop(struct bundle *bundle) /* All our prompts and the diagnostic socket */ descriptor_UpdateSet(&server.desc, &rfds, NULL, NULL, &nfds); + bundle_CleanDatalinks(bundle); if (bundle_IsDead(bundle)) /* Don't select - we'll be here forever */ break;