summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-04-05 03:20:06 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-04-05 03:20:06 +0000
commite1b7e8b238f2a4c6f61148f78aae534163e987c6 (patch)
tree988f50585dbc59e0f91d756061dacf8c4216ab7a /serial.c
parentb31a806a271a937803f3998741967e33df4d80ed (diff)
downloadgpsd-e1b7e8b238f2a4c6f61148f78aae534163e987c6.tar.gz
Extend speed range, bug reported by Ulrich Ruess.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/serial.c b/serial.c
index 8b278168..dda0b2a0 100644
--- a/serial.c
+++ b/serial.c
@@ -54,8 +54,10 @@ int gpsd_set_speed(struct gps_device_t *session,
rate = B19200;
else if (speed < 57600)
rate = B38400;
- else
+ else if (speed < 115200)
rate = B57600;
+ else
+ rate = B115200;
tcflush(session->gpsdata.gps_fd, TCIOFLUSH); /* toss stale data */
if (speed!=cfgetispeed(&session->ttyset) || stopbits!=session->gpsdata.stopbits) {