summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index c2124bec..fa1181da 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -834,6 +834,10 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
session->gpsdata.dev.path, session->packet.type);
if (session->packet.type == COMMENT_PACKET) {
gpsd_report (LOG_PROG, "comment, sync lock deferred\n");
+#ifdef PASSTHROUGH_ENABLE
+ } if (session->packet.type == JSON_PACKET) {
+ gpsd_report (LOG_PROG, "JSON, sync lock deferred\n");
+#endif /* PASSTHROUGH_ENABLE */
} else if (session->packet.type > COMMENT_PACKET) {
first_sync = (session->device_type == NULL);
for (dp = gpsd_drivers; *dp; dp++)
@@ -919,6 +923,14 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
received |= DRIVER_IS;
}
+ /* Special case, JSON packets get passed through as us */
+#ifdef PASSTHROUGH_ENABLE
+ if (session->packet.type == JSON_PACKET) {
+ received |= PASSTHROUGH_IS;
+ }
+ else
+#endif /* PASSTHROUGH_ENABLE */
+
/* Get data from current packet into the fix structure */
if (session->packet.type != COMMENT_PACKET)
if (session->device_type != NULL