diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-10-03 16:12:47 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-04 16:23:28 -0400 |
commit | 7eacbef3fa19f37e85d452787a605aad1396a4d2 (patch) | |
tree | 6dffcfb82c66f69ba096385a3eb60c1256ef37df /driver_tsip.c | |
parent | 85971992215d9ee830046c18d3899f663c8a20df (diff) | |
download | gpsd-7eacbef3fa19f37e85d452787a605aad1396a4d2.tar.gz |
Change the logic for managing the drive mode bit to report reality...
...rather than setting it ad-hoc on a per-driver basis.
Diffstat (limited to 'driver_tsip.c')
-rw-r--r-- | driver_tsip.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/driver_tsip.c b/driver_tsip.c index 7181c420..88d59d30 100644 --- a/driver_tsip.c +++ b/driver_tsip.c @@ -1011,19 +1011,13 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session) static gps_mask_t tsip_parse_input(struct gps_device_t *session) { - gps_mask_t st; - if (session->packet.type == TSIP_PACKET) { - st = tsip_analyze(session); - session->gpsdata.dev.driver_mode = MODE_BINARY; - return st; + return tsip_analyze(session); #ifdef __UNUSED__ } else if (session->packet.type == EVERMORE_PACKET) { (void)gpsd_switch_driver(session, "EverMore binary"); - st = evermore_parse(session, session->packet.outbuffer, - session->packet.outbuflen); - session->gpsdata.dev.driver_mode = MODE_BINARY; - return st; + return evermore_parse(session, session->packet.outbuffer, + session->packet.outbuflen); #endif /* __UNUSED__ */ #ifdef SIRF_ENABLE /* @@ -1034,10 +1028,8 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) */ } else if (session->packet.type == SIRF_PACKET) { (void)gpsd_switch_driver(session, "SiRF binary"); - st = sirf_parse(session, session->packet.outbuffer, - session->packet.outbuflen); - session->gpsdata.dev.driver_mode = MODE_BINARY; - return st; + return sirf_parse(session, session->packet.outbuffer, + session->packet.outbuflen); #endif /* SIRF_ENABLE */ } else return 0; |