summaryrefslogtreecommitdiff
path: root/libgps_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-01-26 14:45:36 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-01-26 14:45:36 -0500
commit2f7d0009d9bb144177926f2e37638497af9edff1 (patch)
treefb02c9787b9e097c5146e11720b5a0a464d1ce55 /libgps_core.c
parent1e9244b27e968d71c402f76b92afbd99985ee08b (diff)
downloadgpsd-2f7d0009d9bb144177926f2e37638497af9edff1.tar.gz
Reorganize stream argument flags, and create one for timing data.
Diffstat (limited to 'libgps_core.c')
-rw-r--r--libgps_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgps_core.c b/libgps_core.c
index e9890fe5..9ee4abd7 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -655,6 +655,8 @@ int gps_stream(struct gps_data_t *gpsdata, unsigned int flags,
(void)strlcat(buf, "\"raw\":0,", sizeof(buf));
if (flags & WATCH_SCALED)
(void)strlcat(buf, "\"scaled\":false,", sizeof(buf));
+ if (flags & WATCH_TIMING)
+ (void)strlcat(buf, "\"timing\":false,", sizeof(buf));
if (buf[strlen(buf) - 1] == ',')
buf[strlen(buf) - 1] = '\0';
(void)strlcat(buf, "};", sizeof(buf));
@@ -679,6 +681,8 @@ int gps_stream(struct gps_data_t *gpsdata, unsigned int flags,
(void)strlcat(buf, "\"raw\":2,", sizeof(buf));
if (flags & WATCH_SCALED)
(void)strlcat(buf, "\"scaled\":true,", sizeof(buf));
+ if (flags & WATCH_TIMING)
+ (void)strlcat(buf, "\"timing\":true,", sizeof(buf));
/*@-nullpass@*//* shouldn't be needed, splint has a bug */
if (flags & WATCH_DEVICE)
(void)snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),