summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver_italk.c13
-rw-r--r--driver_navcom.c2
-rw-r--r--gpsd.c5
-rw-r--r--libgpsd_core.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/driver_italk.c b/driver_italk.c
index 877599af..2d17da20 100644
--- a/driver_italk.c
+++ b/driver_italk.c
@@ -133,7 +133,7 @@ static gps_mask_t decode_itk_prnstatus(struct gps_device_t *session,
if (len < 62) {
gpsd_report(LOG_PROG, "ITALK: runt PRN_STATUS (len=%zu)\n", len);
- mask = ERROR_IS;
+ mask = 0;
} else {
gps_week = (ushort) getleuw(buf, 7 + 4);
session->context->gps_week = gps_week;
@@ -189,7 +189,7 @@ static gps_mask_t decode_itk_utcionomodel(struct gps_device_t *session,
gpsd_report(LOG_PROG,
"ITALK: bad UTC_IONO_MODEL (len %zu, should be 64)\n",
len);
- return ERROR_IS;
+ return 0;
}
flags = (ushort) getleuw(buf, 7);
@@ -223,7 +223,7 @@ static gps_mask_t decode_itk_subframe(struct gps_device_t *session,
if (len != 64) {
gpsd_report(LOG_PROG,
"ITALK: bad SUBFRAME (len %zu, should be 64)\n", len);
- return ERROR_IS;
+ return 0;
}
flags = (ushort) getleuw(buf, 7 + 4);
@@ -234,7 +234,7 @@ static gps_mask_t decode_itk_subframe(struct gps_device_t *session,
flags & SUBFRAME_WORD_FLAG_MASK ? "error" : "ok",
flags & SUBFRAME_GPS_PREAMBLE_INVERTED ? "(inverted)" : "");
if (flags & SUBFRAME_WORD_FLAG_MASK)
- return ONLINE_IS | ERROR_IS; // don't try decode an erroneous packet
+ return 0; // don't try decode an erroneous packet
/*
* Timo says "SUBRAME message contains decoded navigation message subframe
@@ -340,10 +340,7 @@ static gps_mask_t italk_parse(struct gps_device_t *session,
gpsd_report(LOG_IO, "iTalk unknown packet: id 0x%02x length %zu\n",
type, len);
}
- if (mask == ERROR_IS)
- mask = 0;
- else
- (void)snprintf(session->gpsdata.tag, sizeof(session->gpsdata.tag),
+ (void)snprintf(session->gpsdata.tag, sizeof(session->gpsdata.tag),
"ITK-%02x", type);
return mask | ONLINE_IS;
diff --git a/driver_navcom.c b/driver_navcom.c
index 50ff5811..60d65d8f 100644
--- a/driver_navcom.c
+++ b/driver_navcom.c
@@ -777,7 +777,7 @@ static gps_mask_t handle_0x86(struct gps_device_t *session)
gpsd_report(LOG_ERROR,
"Navcom: packet type 0x86: too many satellites!\n");
gpsd_zero_satellites(&session->gpsdata);
- return ERROR_IS;
+ return 0;
}
prn = getub(buf, n);
tracking_status = getub(buf, n + 1);
diff --git a/gpsd.c b/gpsd.c
index 8313299f..7e049dee 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1644,8 +1644,9 @@ int main(int argc, char *argv[])
if (changed == ERROR_IS) {
gpsd_report(LOG_WARN,
- "packet sniffer failed sync with %s\n",
- device->gpsdata.dev.path);
+ "packet sniffer failed sync with %s (flags %s)\n",
+ device->gpsdata.dev.path,
+ gpsd_maskdump(changed));
deactivate_device(device);
continue;
} else if ((changed & ONLINE_IS) == 0) {
diff --git a/libgpsd_core.c b/libgpsd_core.c
index e144af5d..e7e24ce4 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -656,7 +656,9 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
gpsd_report(LOG_RAW,
"packet sniff on %s finds type %d\n",
session->gpsdata.dev.path, session->packet.type);
- if (session->packet.type > COMMENT_PACKET) {
+ if (session->packet.type == COMMENT_PACKET) {
+ gpsd_report (LOG_PROG, "comment, sync lock deferred\n");
+ } else if (session->packet.type > COMMENT_PACKET) {
first_sync = (session->device_type == NULL);
for (dp = gpsd_drivers; *dp; dp++)
if (session->packet.type == (*dp)->packet_type) {