From 18b21a2e38326fbeadee9d893e5da11874082280 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 24 Feb 2015 05:58:00 -0500 Subject: BUGFIX: Prevent spurious path rewrites in the JSON passthrough driver. All regression tests pass. --- drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers.c') 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 */ -- cgit v1.2.1