summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-23 04:00:49 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-23 04:00:49 -0400
commita211e0f8e86649fa63dead9f8290805245198257 (patch)
tree1c4189c25df719b99d9baa6e7a1a2d97afa9e715
parente13757fe9211baae0dcd5171d37a5c79fa14441f (diff)
downloadgpsd-a211e0f8e86649fa63dead9f8290805245198257.tar.gz
If the profiling code isn't compiled in, timing policy bit must be forced off.
-rw-r--r--gpsd.c3
-rwxr-xr-xgpsprof2
2 files changed, 4 insertions, 1 deletions
diff --git a/gpsd.c b/gpsd.c
index 0ea6cf33..fdcf622e 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1034,6 +1034,9 @@ static void handle_request(struct subscriber_t *sub,
++buf;
} else {
int status = json_watch_read(buf + 1, &sub->policy, &end);
+#ifndef TIMING_ENABLE
+ sub->policy.timing = false;
+#endif /* TIMING_ENABLE */
if (end == NULL)
buf += strlen(buf);
else {
diff --git a/gpsprof b/gpsprof
index 4d2b4312..ab53f744 100755
--- a/gpsprof
+++ b/gpsprof
@@ -283,7 +283,7 @@ def plotframe(await, fname, threshold, title, dump):
#sys.stderr.write("found %s device @%sbps..." % (device["driver"], device["bps"]))
if session.data["class"] == "WATCH":
if "timing" in options and not session.data.get("timing"):
- sys.stderr.write("gpsprof: timing is not enabled.\n")
+ sys.stderr.write("timing is not enabled.\n")
sys.exit(1)
# Ignore everything but TPVs for the moment
if session.data["class"] != "TPV":