diff options
author | brian <brian@FreeBSD.org> | 1999-09-26 23:02:18 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-09-26 23:02:18 +0000 |
commit | 814514a6402a4a3d6bf10c54ac9d4892be30769d (patch) | |
tree | 019c432fa84622432c509478bf19832b46638860 /usr.sbin/ppp/tty.c | |
parent | 303f4da1978732f509bb89dbe59126148f145948 (diff) | |
download | FreeBSD-src-814514a6402a4a3d6bf10c54ac9d4892be30769d.zip FreeBSD-src-814514a6402a4a3d6bf10c54ac9d4892be30769d.tar.gz |
Support ``set cd off'' to tell ppp not to even look for carrier on the
device.
Diffstat (limited to 'usr.sbin/ppp/tty.c')
-rw-r--r-- | usr.sbin/ppp/tty.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ppp/tty.c b/usr.sbin/ppp/tty.c index 2ca27cc..6a4c1ac 100644 --- a/usr.sbin/ppp/tty.c +++ b/usr.sbin/ppp/tty.c @@ -115,7 +115,7 @@ tty_Timeout(void *data) if (Online(dev)) log_Printf(LogPHASE, "%s: %s: CD detected\n", p->link.name, p->name.full); else if (++dev->carrier_seconds >= p->cfg.cd.delay) { - if (p->cfg.cd.required) + if (p->cfg.cd.necessity == CD_REQUIRED) log_Printf(LogPHASE, "%s: %s: Required CD not detected\n", p->link.name, p->name.full); else { @@ -169,7 +169,7 @@ tty_AwaitCarrier(struct physical *p) { struct ttydevice *dev = device2tty(p->handler); - if (physical_IsSync(p)) + if (p->cfg.cd.necessity == CD_NOTREQUIRED || physical_IsSync(p)) return CARRIER_OK; if (dev->mbits == -1) { @@ -180,7 +180,8 @@ tty_AwaitCarrier(struct physical *p) return CARRIER_PENDING; /* Not yet ! */ } - return Online(dev) || !p->cfg.cd.required ? CARRIER_OK : CARRIER_LOST; + return Online(dev) || !p->cfg.cd.necessity == CD_REQUIRED ? + CARRIER_OK : CARRIER_LOST; } static int |