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>
This commit is contained in:
parent
fb802c79c3
commit
ec5e7f36dc
@ -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.45 1999/02/06 02:54:43 brian Exp $
|
||||
* $Id: bundle.c,v 1.46 1999/02/25 11:59:36 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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user