summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-09-22 14:02:09 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-22 14:02:09 -0400
commit2e5fc531f2d8b9278dccd48cd274447a598b56fa (patch)
treea5686e58f02c7bc4d055d89c137fae5d0f5b4f36 /packet.c
parent99a75d065a0677323067fb1f7979cc37283f1aee (diff)
downloadgpsd-2e5fc531f2d8b9278dccd48cd274447a598b56fa.tar.gz
Simplify TSIP satellite-picture packet recognition.
Previuous versions allowed a data length of up to 27. It's not clear why, as the TSIP reference specifies a length of 25 and that's all the driver can use. All regression tests pass.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index a62f76b5..27b78ab0 100644
--- a/packet.c
+++ b/packet.c
@@ -1723,8 +1723,7 @@ void packet_parse(struct gps_packet_t *lexer)
/* pass */ ;
else if (TSIP_ID_AND_LENGTH(0x57, 8))
/* pass */ ;
- else if ((0x5a == pkt_id)
- && ((29 <= packetlen) && (31 >= packetlen)))
+ else if (TSIP_ID_AND_LENGTH(0x5a, 25))
/* pass */ ;
else if (TSIP_ID_AND_LENGTH(0x5b, 16))
/* pass */ ;