summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2000-04-02 01:36:23 +0000
committerbrian <brian@cvs.openbsd.org>2000-04-02 01:36:23 +0000
commitfcce3b94d73b39de4847894c86696258d23dfd2a (patch)
treec9a825c08b01b7ba62cd17cc89c299ba28c349ea
parente9e895c13021b60e9ab1016e6d30178cd4da2f72 (diff)
Don't wait for the redial timer before exiting due to the last
background/direct link closing.
-rw-r--r--usr.sbin/ppp/ppp/datalink.c5
-rw-r--r--usr.sbin/ppp/ppp/main.c3
2 files changed, 5 insertions, 3 deletions
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 <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);
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;