summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-05-24 07:50:42 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-05-24 07:50:42 +0000
commitf09895b256992813c07814b7e2cf5d8efabf73f3 (patch)
treee911c53c82842cf675eb5533aaaeda3a9dc72914 /serial.c
parentc0e29b52b62a7eb751f35f046d9966351bec00be (diff)
downloadgpsd-f09895b256992813c07814b7e2cf5d8efabf73f3.tar.gz
Correct error in hunt logic.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/serial.c b/serial.c
index f8ee5ed2..b7c85939 100644
--- a/serial.c
+++ b/serial.c
@@ -132,6 +132,7 @@ int gpsd_open(struct gps_device_t *session)
*/
#define SNIFF_RETRIES 600
+#include "stdio.h"
int gpsd_next_hunt_setting(struct gps_device_t *session)
/* advance to the next hunt setting */
{
@@ -143,10 +144,10 @@ int gpsd_next_hunt_setting(struct gps_device_t *session)
session->baudindex = 0;
if (session->gpsdata.stopbits++ >= 2)
return 0; /* hunt is over, no sync */
- gpsd_set_speed(session,
- rates[session->baudindex],
- session->gpsdata.stopbits);
}
+ gpsd_set_speed(session,
+ rates[session->baudindex],
+ session->gpsdata.stopbits);
}
return 1; /* keep hunting */