Don't wait for the redial timer before exiting due to the last
authorbrian <brian@openbsd.org>
Sun, 2 Apr 2000 01:36:22 +0000 (01:36 +0000)
committerbrian <brian@openbsd.org>
Sun, 2 Apr 2000 01:36:22 +0000 (01:36 +0000)
background/direct link closing.

usr.sbin/ppp/ppp/datalink.c
usr.sbin/ppp/ppp/main.c

index 1e4436c..cb99d2b 100644 (file)
@@ -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 <sys/param.h>
@@ -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);
index 3d9993a..5b4c19b 100644 (file)
@@ -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;