diff options
author | Gary E. Miller <gem@rellim.com> | 2018-11-19 20:45:58 +0000 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-11-19 20:45:58 +0000 |
commit | 9185aa9f763de5a5cde13e264399b9e6bfff62f1 (patch) | |
tree | 7ec666d4dc92f39b0c1e9a50bbb1dd1222938428 | |
parent | 8e2352f32808cf186e0ca04d4625b61008b1f5fa (diff) | |
download | gpsd-9185aa9f763de5a5cde13e264399b9e6bfff62f1.tar.gz |
libgps_json: Give leapseconds a default of 0.
Without a default, fails when connecting to older clients.
-rw-r--r-- | libgps_json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgps_json.c b/libgps_json.c index 8dece03a..ffde557e 100644 --- a/libgps_json.c +++ b/libgps_json.c @@ -46,7 +46,8 @@ static int json_tpv_read(const char *buf, struct gps_data_t *gpsdata, .dflt.real = NAN}, {"time", t_real, .addr.real = &gpsdata->fix.time, .dflt.real = NAN}, - {"leapseconds", t_integer, .addr.integer = &leapseconds}, + {"leapseconds", t_integer, .addr.integer = &leapseconds, + .dflt.integer = 0}, {"ept", t_real, .addr.real = &gpsdata->fix.ept, .dflt.real = NAN}, {"lon", t_real, .addr.real = &gpsdata->fix.longitude, |