summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/i4b.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-08-16 09:06:59 +0000
committerbrian <brian@FreeBSD.org>2000-08-16 09:06:59 +0000
commit724f61b07d51e05677c46e23e943f24eac26cf11 (patch)
treee87ec48fbf063d5d59e769a907a93cf8653b74b7 /usr.sbin/ppp/i4b.c
parent22208cf490fdf4c918876f9e325f07f248fdd65a (diff)
downloadFreeBSD-src-724f61b07d51e05677c46e23e943f24eac26cf11.zip
FreeBSD-src-724f61b07d51e05677c46e23e943f24eac26cf11.tar.gz
Default the bandwidth of an ISDN B channel to 65536bps
Diffstat (limited to 'usr.sbin/ppp/i4b.c')
-rw-r--r--usr.sbin/ppp/i4b.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ppp/i4b.c b/usr.sbin/ppp/i4b.c
index cdaad51..cd77d41 100644
--- a/usr.sbin/ppp/i4b.c
+++ b/usr.sbin/ppp/i4b.c
@@ -246,11 +246,13 @@ static int
i4b_Speed(struct physical *p)
{
struct termios ios;
+ int ret;
- if (tcgetattr(p->fd, &ios) == -1)
- return 0;
+ if (tcgetattr(p->fd, &ios) == -1 ||
+ (ret = SpeedToInt(cfgetispeed(&ios))) == 0)
+ ret = 65536;
- return SpeedToInt(cfgetispeed(&ios));
+ return ret;
}
static const char *
OpenPOWER on IntegriCloud