diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-05-07 15:43:09 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-05-07 15:43:09 -0400 |
commit | f5cc843cbdf5b0ef2e90ca8f0673a8bdd4c81745 (patch) | |
tree | 36aa46c6aa8ef214ba906cbf84c4e48c25022a88 /gpsd.h-tail | |
parent | 3940cb5995bba3a05061f31ce220d546f306bdc1 (diff) | |
download | gpsd-f5cc843cbdf5b0ef2e90ca8f0673a8bdd4c81745.tar.gz |
Allow recovery from failed read of partial packet.
Before this change, first read of a partial packet just after a device
is activated would set packet type to -1 and kick us to the next hunt
setting. The new getcount member is used to make sure this only
happens on the *second* read. Thus, we recover from seeing an initial
packet fragment.
It's possible this case could only have come up with test logs, but
it seems like a good cheap robustification measure.
All regression tests pass.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r-- | gpsd.h-tail | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail index 34ea7a0a..a8c0b9c1 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -290,6 +290,7 @@ struct gps_device_t { unsigned int baudindex; int saved_baud; struct gps_packet_t packet; + int getcount; char subtype[64]; /* firmware version or subtype ID */ double opentime; double releasetime; |