summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-09-22 15:05:35 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-22 15:05:35 -0400
commit799fe2e2dbd7f65aadc407e5c256f4eab57bc109 (patch)
treea94e974802232449531d305ae8c2554c51eee647 /packet.c
parentb382e653a5af4c6b5b32c42b9d80e8830135f14f (diff)
downloadgpsd-799fe2e2dbd7f65aadc407e5c256f4eab57bc109.tar.gz
More TSIP packet recognition cleanup. All regression tests pass.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index b0b0968d..2620e7ce 100644
--- a/packet.c
+++ b/packet.c
@@ -1734,14 +1734,19 @@ void packet_parse(struct gps_packet_t *lexer)
/* pass */ ;
else if (TSIP_ID_AND_LENGTH(0x83, 36))
/* pass */ ;
- else if ((0x84 == pkt_id)
- && ((0x28 <= packetlen) && (0x29 >= packetlen)))
+ else if (TSIP_ID_AND_LENGTH(0x84, 36))
/* pass */ ;
else if ((0x8e == pkt_id))
/* pass */ ;
else if ((0x8f == pkt_id))
/* pass */ ;
- else if ((0xbb == pkt_id) && (0x2c == packetlen))
+ /*
+ * [TSIP] says the 0xbb payload should be 44 bytes, but
+ * 40 is the only length the TSIP driver knows how to use.
+ * We've had a report that the Accutime Gold ships a
+ * different length.
+ */
+ else if (TSIP_ID_AND_LENGTH(0xbb, 40))
/* pass */ ;
else {
gpsd_report(LOG_IO,