diff options
author | Brian Somers <brian@FreeBSD.org> | 1999-11-26 22:44:33 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1999-11-26 22:44:33 +0000 |
commit | fdc29d54a48f371bfc1c3af8a6dff0450b6523d0 (patch) | |
tree | 02e7ca276db88600b19e1c4e57da792780e09cc1 /usr.sbin/ppp/physical.c | |
parent | da2440e8264eb599767a0926cd6bb18053d05d36 (diff) | |
download | src-fdc29d54a48f371bfc1c3af8a6dff0450b6523d0.tar.gz src-fdc29d54a48f371bfc1c3af8a6dff0450b6523d0.zip |
Change ``set cd'' so that its default value is device specific. The
default is still 1 second for ttys, but is now 6 seconds for i4b (ISDN)
devices and 5 seconds for ethernet (PPPoE) devices.
Notes
Notes:
svn path=/head/; revision=53733
Diffstat (limited to 'usr.sbin/ppp/physical.c')
-rw-r--r-- | usr.sbin/ppp/physical.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index f8915c9fa53e..e4026337f227 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -188,8 +188,8 @@ physical_Create(struct datalink *dl, int type) p->cfg.parity = CS8; memcpy(p->cfg.devlist, MODEM_LIST, sizeof MODEM_LIST); p->cfg.ndev = NMODEMS; - p->cfg.cd.necessity = CD_VARIABLE; - p->cfg.cd.delay = DEF_CDDELAY; + p->cfg.cd.necessity = CD_DEFAULT; + p->cfg.cd.delay = 0; /* reconfigured or device specific default */ lcp_Init(&p->link.lcp, dl->bundle, &p->link, &dl->fsmp); ccp_Init(&p->link.ccp, dl->bundle, &p->link, &dl->fsmp); @@ -411,6 +411,7 @@ int physical_ShowStatus(struct cmdargs const *arg) { struct physical *p = arg->cx->physical; + struct cd *cd; const char *dev; int n; @@ -476,9 +477,12 @@ physical_ShowStatus(struct cmdargs const *arg) prompt_Printf(arg->prompt, ", CTS/RTS %s\n", (p->cfg.rts_cts ? "on" : "off")); prompt_Printf(arg->prompt, " CD check delay: "); - if (p->cfg.cd.necessity == CD_NOTREQUIRED) + cd = p->handler ? &p->handler->cd : &p->cfg.cd; + if (cd->necessity == CD_NOTREQUIRED) prompt_Printf(arg->prompt, "no cd"); - else { + else if (p->cfg.cd.necessity == CD_DEFAULT) { + prompt_Printf(arg->prompt, "device specific"); + } else { prompt_Printf(arg->prompt, "%d second%s", p->cfg.cd.delay, p->cfg.cd.delay == 1 ? "" : "s"); if (p->cfg.cd.necessity == CD_REQUIRED) |