o Mention our link name with timed HDLC error reports.

o Switch off our carrier detect timer if we don't have
  CD after logging in.
o Maintain our CD timer after a link transfer.
This commit is contained in:
Brian Somers 1998-05-03 11:24:16 +00:00
parent 96c9bb21aa
commit 6e7cdde1a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=35645
2 changed files with 18 additions and 6 deletions

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: hdlc.c,v 1.28.2.30 1998/04/28 01:25:18 brian Exp $
* $Id: hdlc.c,v 1.28.2.31 1998/05/01 19:24:37 brian Exp $
*
* TODO:
*/
@ -577,7 +577,7 @@ hdlc_ReportStatus(struct cmdargs const *arg)
{
struct hdlc *hdlc = &arg->cx->physical->hdlc;
prompt_Printf(arg->prompt, "HDLC level errors:\n");
prompt_Printf(arg->prompt, "%s HDLC level errors:\n", arg->cx->name);
prompt_Printf(arg->prompt, " Bad Frame Check Sequence fields: %u\n",
hdlc->stats.badfcs);
prompt_Printf(arg->prompt, " Bad address (!= 0x%02x) fields: %u\n",

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: modem.c,v 1.77.2.63 1998/05/01 19:25:25 brian Exp $
* $Id: modem.c,v 1.77.2.64 1998/05/02 21:57:46 brian Exp $
*
* TODO:
*/
@ -672,7 +672,13 @@ modem_Raw(struct physical *modem, struct bundle *bundle)
return (-1);
fcntl(modem->fd, F_SETFL, oldflag | O_NONBLOCK);
modem_Timeout(modem);
if (modem->dev_is_modem && ioctl(modem->fd, TIOCMGET, &modem->mbits) == 0 &&
!(modem->mbits & TIOCM_CD)) {
log_Printf(LogDEBUG, "%s: Switching off timer - %s doesn't support CD\n",
modem->link.name, modem->name.full);
timer_Stop(&modem->Timer);
} else
modem_Timeout(modem);
return 0;
}
@ -959,7 +965,10 @@ iov2modem(struct datalink *dl, struct iovec *iov, int *niov, int maxiov, int fd)
p->fd = fd;
throughput_start(&p->link.throughput, "modem throughput",
Enabled(dl->bundle, OPT_THROUGHPUT));
/* Don't need a modem timer.... */
if (p->Timer.state != TIMER_STOPPED) {
p->Timer.state = TIMER_STOPPED; /* Special - see modem2iov() */
modem_StartTimer(dl->bundle, p);
}
/* Don't need to lock the device in -direct mode */
return p;
@ -977,7 +986,10 @@ modem2iov(struct physical *p, struct iovec *iov, int *niov, int maxiov)
timer_Stop(&p->link.ccp.fsm.OpenTimer);
timer_Stop(&p->link.lcp.fsm.StoppedTimer);
timer_Stop(&p->link.ccp.fsm.StoppedTimer);
timer_Stop(&p->Timer);
if (p->Timer.state != TIMER_STOPPED) {
timer_Stop(&p->Timer);
p->Timer.state = TIMER_RUNNING; /* Special - see iov2modem() */
}
timer_Stop(&p->link.throughput.Timer);
}