From 43ea138f243d0cc3b64fe81dc96298f64e1be4c5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 15 Jun 2011 02:13:30 -0400 Subject: Bug fixed, all regression tests now pass with PASSTHROUGH_ENABLED. --- SConstruct | 2 +- gpsdecode.c | 4 ++-- libgpsd_core.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 1ea130ef..e78ecaf3 100644 --- a/SConstruct +++ b/SConstruct @@ -85,7 +85,7 @@ boolopts = ( ("bluez", True, "BlueZ support for Bluetooth devices"), ("ipv6", True, "build IPv6 support"), ("netfeed", True, "build support for handling TCP/IP data sources"), - ("passthrough", False, "build support for passing through JSON"), + ("passthrough", True, "build support for passing through JSON"), # Other daemon options ("timing", True, "latency timing support"), ("control_socket",True, "control socket for hotplug notifications"), diff --git a/gpsdecode.c b/gpsdecode.c index d3d68169..13f66eb5 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -392,8 +392,8 @@ static void decode(FILE *fpin, FILE*fpout) struct policy_t policy; char buf[GPS_JSON_RESPONSE_MAX * 4]; - (void)strlcpy(session.gpsdata.dev.path, - "stdin", sizeof(session.gpsdata.dev.path)); + //This looks like a good idea, but it breaks regression tests + //(void)strlcpy(session.gpsdata.dev.path, "stdin", sizeof(session.gpsdata.dev.path)); memset(&policy, '\0', sizeof(policy)); policy.json = json; diff --git a/libgpsd_core.c b/libgpsd_core.c index 8e0373dc..e829634b 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -835,7 +835,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) if (session->packet.type == COMMENT_PACKET) { gpsd_report (LOG_PROG, "comment, sync lock deferred\n"); #ifdef PASSTHROUGH_ENABLE - } if (session->packet.type == JSON_PACKET) { + } else 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) { -- cgit v1.2.1