summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-06-14 18:52:34 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-06-14 18:52:34 -0400
commite5cf5cd806ee0277ec4174acc9dfdf7cb0c85f64 (patch)
tree45a78c70c07dcc003de6e9a4f998bba9620d54f8 /gpsd.c
parent6d3452b088042bcb6deb9521efa53dd0f9a029cd (diff)
downloadgpsd-e5cf5cd806ee0277ec4174acc9dfdf7cb0c85f64.tar.gz
First xut at JSON passthrough code.
Not turned in by default yet; it interferes with RTCM2 decoding.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index 6683e517..4d45d05d 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1566,6 +1566,16 @@ static void consume_packets(struct gps_device_t *device)
if (sub == NULL || sub->active == 0 || !subscribed(sub, device))
continue;
+#ifdef PASSTHROUGH_ENABLE
+ /* this is for passing through JSON packets */
+ if ((changed & PASSTHROUGH_IS) != 0) {
+ (void)throttled_write(sub,
+ (char *)device->packet.outbuffer,
+ device->packet.outbuflen);
+ continue;
+ }
+#endif /* PASSTHROUGH_ENABLE */
+
/* report raw packets to users subscribed to those */
raw_report(sub, device);