Don't say ``Enter pause (-1) for redialing when we're using a random interval.
Show the calculated random value instead. Suggested by: Bill Richter <richterb@binkley.foothill.net>
This commit is contained in:
parent
240e0fdd93
commit
a65be2273d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77012
@ -93,19 +93,16 @@ datalink_StartDialTimer(struct datalink *dl, int Timeout)
|
||||
|
||||
timer_Stop(&dl->dial.timer);
|
||||
if (Timeout) {
|
||||
if (Timeout > 0)
|
||||
dl->dial.timer.load = Timeout * SECTICKS;
|
||||
else {
|
||||
if (Timeout < 0)
|
||||
result = (random() % DIAL_TIMEOUT) + 1;
|
||||
dl->dial.timer.load = result * SECTICKS;
|
||||
}
|
||||
dl->dial.timer.load = result * SECTICKS;
|
||||
dl->dial.timer.func = datalink_OpenTimeout;
|
||||
dl->dial.timer.name = "dial";
|
||||
dl->dial.timer.arg = dl;
|
||||
timer_Start(&dl->dial.timer);
|
||||
if (dl->state == DATALINK_OPENING)
|
||||
log_Printf(LogPHASE, "%s: Enter pause (%d) for redialing.\n",
|
||||
dl->name, Timeout);
|
||||
dl->name, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user