diff options
author | brian <brian@cvs.openbsd.org> | 2000-08-16 09:07:02 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 2000-08-16 09:07:02 +0000 |
commit | 6c42c47f355988ae2c76b7cc2996b1c74e7850b0 (patch) | |
tree | 55ec2c1b0246959935d806440ec851185a8dae24 /usr.sbin | |
parent | 0f1f18322e7e7ac3dd63711107a2269c07feda36 (diff) |
Default the bandwidth of an ISDN B channel to 65536bps
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ppp/i4b.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ppp/i4b.c b/usr.sbin/ppp/ppp/i4b.c index 4325d449956..a4a87988748 100644 --- a/usr.sbin/ppp/ppp/i4b.c +++ b/usr.sbin/ppp/ppp/i4b.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: i4b.c,v 1.2 2000/02/27 01:38:26 brian Exp $ + * $OpenBSD: i4b.c,v 1.3 2000/08/16 09:07:01 brian Exp $ */ #include <sys/param.h> @@ -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 * |