summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-11-16 20:21:01 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-11-16 20:21:01 +0000
commit4ff753d36171cb5f2e6dd8354a0638476dc40d49 (patch)
tree2e4b97848bfc2d3324651a6f79b67827e32f0b65 /libgpsd_core.c
parent29102349a36e434937268f7975bcd6570ccaca04 (diff)
downloadgpsd-4ff753d36171cb5f2e6dd8354a0638476dc40d49.tar.gz
Be a bit more generous about setting the observed mask...
...in particular so it notes the presence of AIS packets after sync has been achieved. All regression tests pass.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 8ac02ee8..47a9c7f2 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -529,6 +529,9 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
session->d_xmit_time = timestamp();
#endif /* TIMING_ENABLE */
+ if (session->packet.type >= COMMENT_PACKET)
+ /*@i2@*/session->observed |= PACKET_TYPEMASK(session->packet.type);
+
/* can we get a full packet from the device? */
if (session->device_type) {
newlen = session->device_type->get_packet(session);
@@ -545,7 +548,6 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
session->gpsdata.dev.path,
session->packet.type);
if (session->packet.type > COMMENT_PACKET) {
- /*@i2@*/session->observed |= PACKET_TYPEMASK(session->packet.type);
first_sync = (session->device_type == NULL);
for (dp = gpsd_drivers; *dp; dp++)
if (session->packet.type == (*dp)->packet_type) {