summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-09-22 13:46:38 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-22 13:46:38 -0400
commit1893cab3e46aad8fc23a15466b9ce8d505c719d0 (patch)
tree8cdd939bfefe9efef686e92f07e2999ae271b7c1 /packet.c
parenta1c59d064210c1d0f61e91567eb49c949db1924a (diff)
downloadgpsd-1893cab3e46aad8fc23a15466b9ce8d505c719d0.tar.gz
More TSIP packet cleanup. All regression tests pass.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/packet.c b/packet.c
index 7ea62442..dde79800 100644
--- a/packet.c
+++ b/packet.c
@@ -1727,17 +1727,20 @@ void packet_parse(struct gps_packet_t *lexer)
else if ((0x5c == pkt_id)
&& ((0x1c <= packetlen) && (0x1e >= packetlen)))
/* pass */ ;
- /* Not in [TSIP] */
else if (TSIP_ID_AND_LENGTH(0x5e, 2))
/* pass */ ;
- else if ((0x5f == pkt_id) && (70 == packetlen))
+ /*
+ * Not in [TSIP]. It's unclear where this test came from or
+ * why it's here; the TSIP driver doesn't use type 0x5f.
+ */
+ else if (TSIP_ID_AND_LENGTH(0x5f, 66))
/* pass */ ;
else if ((0x6d == pkt_id)
&& ((0x14 <= packetlen) && (0x20 >= packetlen)))
/* pass */ ;
- else if ((0x82 == pkt_id) && (0x05 == packetlen))
+ else if (TSIP_ID_AND_LENGTH(0x82, 1))
/* pass */ ;
- else if (0x83 == pkt_id)
+ else if (TSIP_ID_AND_LENGTH(0x83, 36))
/* pass */ ;
else if ((0x84 == pkt_id)
&& ((0x28 <= packetlen) && (0x29 >= packetlen)))