summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-25 15:17:12 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-25 15:17:12 +0000
commit9976d38a26cd54bb494698a1959c4242f40fc155 (patch)
tree9a033d356f2e835091e30a5d327c8f0c39c60a80 /gpsd.c
parent11f1c1d41db9fe3884130d81d655b4fa476c8469 (diff)
downloadgpsd-9976d38a26cd54bb494698a1959c4242f40fc155.tar.gz
Regression fixed. All tests pass. Code splints clean.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gpsd.c b/gpsd.c
index 9f1cb690..45ad184c 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2192,6 +2192,10 @@ int main(int argc, char *argv[])
gpsd_report(LOG_RAW+1, "polling %d\n", device->gpsdata.gps_fd);
changed = gpsd_poll(device);
+ /* must have a full packet to continue */
+ if ((changed & PACKET_SET) == 0)
+ continue;
+
/* raw hook and relaying functions */
for (channel = channels; channel < channels + NITEMS(channels); channel++) {
if (channel->subscriber == NULL || channel->device == NULL || channel->device != device)
@@ -2372,7 +2376,7 @@ int main(int argc, char *argv[])
char buf2[BUFSIZ];
int state = device->cycle_state;
device->poll_times[sub - subscribers] = timestamp();
- if (changed &~ ONLINE_SET) {
+ if (changed & DATA_SET) {
bool report_fix = false;
if ((state & CYCLE_END_RELIABLE)!=0) {
/*