diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-10 00:37:46 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-10 00:37:46 -0500 |
commit | 79c9ef1c9a5455342300d24333b982cadd58815e (patch) | |
tree | 2b3c7fa3dba30bb1501f2b8f89523635e240a466 /libgps_sock.c | |
parent | 038f7c549642d361443e133a0cbcdd89c7c3f24d (diff) | |
download | gpsd-79c9ef1c9a5455342300d24333b982cadd58815e.tar.gz |
Teach the client library about ppsbar...
...against the extremmely unlikely evebtuality of anything but gpsmon
wanting to use it.
Diffstat (limited to 'libgps_sock.c')
-rw-r--r-- | libgps_sock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgps_sock.c b/libgps_sock.c index edb812dc..4232b006 100644 --- a/libgps_sock.c +++ b/libgps_sock.c @@ -520,6 +520,8 @@ int gps_sock_stream(struct gps_data_t *gpsdata, unsigned int flags, (void)strlcat(buf, "\"timing\":false,", sizeof(buf)); if (flags & WATCH_SPLIT24) (void)strlcat(buf, "\"split24\":false,", sizeof(buf)); + if (flags & WATCH_PPSBAR) + (void)strlcat(buf, "\"ppsbar\":false,", sizeof(buf)); if (buf[strlen(buf) - 1] == ',') buf[strlen(buf) - 1] = '\0'; (void)strlcat(buf, "};", sizeof(buf)); @@ -548,6 +550,8 @@ int gps_sock_stream(struct gps_data_t *gpsdata, unsigned int flags, (void)strlcat(buf, "\"timing\":true,", sizeof(buf)); if (flags & WATCH_SPLIT24) (void)strlcat(buf, "\"split24\":true,", sizeof(buf)); + if (flags & WATCH_PPSBAR) + (void)strlcat(buf, "\"ppsbar\":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), |