diff options
author | brian <brian@cvs.openbsd.org> | 1999-03-01 00:45:15 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1999-03-01 00:45:15 +0000 |
commit | 5376803c9e4a906a4befe58a0c30f3ed32f270bb (patch) | |
tree | 275196fee0d860f5a18ed7c8b7c4038775d21082 /usr.sbin | |
parent | 840acbec61cc585c0ef8a7d46a8dba89da56bf10 (diff) |
Bring up auto links despite there being no data queued if
we're already in network phase and our autoload values
are set with no minimum threshold (the default).
Tell the autoload timer that it's ``coming up'' *before*
calling AutoLoadTimeout() directly... not after. This
prevents the very first demand-dial connection from
immediately disconnecting when there are other auto links.
Problem diagnosis: Ted Mittelstaedt <tedm@toybox.placo.com>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ppp/bundle.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/ppp/bundle.c b/usr.sbin/ppp/ppp/bundle.c index 3b51352a615..f6d04a82da7 100644 --- a/usr.sbin/ppp/ppp/bundle.c +++ b/usr.sbin/ppp/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.c,v 1.9 1999/02/25 12:06:51 brian Exp $ + * $Id: bundle.c,v 1.10 1999/03/01 00:45:14 brian Exp $ */ #include <sys/param.h> @@ -228,6 +228,7 @@ bundle_StartAutoLoadTimer(struct bundle *bundle, int up) struct datalink *dl; timer_Stop(&bundle->autoload.timer); + bundle->autoload.comingup = up ? 1 : 0; if (bundle->CleaningUp || bundle->phase != PHASE_NETWORK) { dl = NULL; @@ -273,8 +274,6 @@ bundle_StartAutoLoadTimer(struct bundle *bundle, int up) bundle->autoload.running = 1; } - - bundle->autoload.comingup = up ? 1 : 0; } static void @@ -526,8 +525,9 @@ bundle_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) else if (bundle->autoload.timer.state != TIMER_RUNNING || bundle->autoload.comingup) bundle_StartAutoLoadTimer(bundle, 0); - } else if (queued && (bundle->autoload.timer.state != TIMER_RUNNING || - !bundle->autoload.comingup)) + } else if ((bundle_Phase(bundle) == PHASE_NETWORK || queued) && + (bundle->autoload.timer.state != TIMER_RUNNING || + !bundle->autoload.comingup)) bundle_StartAutoLoadTimer(bundle, 1); } |