summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-24 05:58:00 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-24 05:58:00 -0500
commit18b21a2e38326fbeadee9d893e5da11874082280 (patch)
treea6257cbaeacef6262af1bfdfbb222926944f24e4 /drivers.c
parente35e73cdc32d4a380be0cec442d7920fdec750ff (diff)
downloadgpsd-18b21a2e38326fbeadee9d893e5da11874082280.tar.gz
BUGFIX: Prevent spurious path rewrites in the JSON passthrough driver.
All regression tests pass.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers.c b/drivers.c
index 0003ad11..96387cad 100644
--- a/drivers.c
+++ b/drivers.c
@@ -1450,7 +1450,7 @@ static gps_mask_t json_pass_packet(struct gps_device_t *session)
gpsd_report(&session->context->errout, LOG_IO,
"<= GPS: %s\n", (char *)session->lexer.outbuffer);
- if (!str_starts_with(session->gpsdata.dev.path, "gpsd://localhost:"))
+ if (strstr(session->gpsdata.dev.path, ":/") != NULL && strstr(session->gpsdata.dev.path, "localhost") == NULL)
{
/*@-nullpass@*/ /* required only because splint is buggy */
/* devices and paths need to be edited */