diff options
author | Gary E. Miller <gem@rellim.com> | 2011-01-03 18:37:02 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2011-01-03 18:37:02 -0800 |
commit | c31de5d55ed2078a84bca4ae85e2e1b9208c612b (patch) | |
tree | 066e9b570687735b7c6aa00e58418ec5da29271a /subframe.c | |
parent | 4707b8c7325df4f9b98c48bca76ba130f46482f7 (diff) | |
download | gpsd-c31de5d55ed2078a84bca4ae85e2e1b9208c612b.tar.gz |
A lot of subframes are invalid, only SUBFRAME_IS on good ones.
Diffstat (limited to 'subframe.c')
-rw-r--r-- | subframe.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -132,7 +132,7 @@ static void subframe_almanac(unsigned int tSVID, uint32_t words[], almp->d_af1); } -void gpsd_interpret_subframe(struct gps_device_t *session, +gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session, unsigned int tSVID, uint32_t words[]) { /* @@ -169,7 +169,7 @@ void gpsd_interpret_subframe(struct gps_device_t *session, gpsd_report(LOG_WARN, "50B: gpsd_interpret_subframe bad preamble: 0x%x header 0x%x\n", preamble, words[0]); - return; + return 0; } subp->integrity = ((words[0] >> 1) & 0x01); /* The subframe ID is in the Hand Over Word (page 80) */ @@ -816,9 +816,10 @@ void gpsd_interpret_subframe(struct gps_device_t *session, break; default: /* unknown/illegal subframe */ + return 0; break; } - return; + return SUBFRAME_IS; } /*@ +usedef @*/ |