diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-04-15 18:39:30 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-04-15 18:39:30 -0400 |
commit | 62bc9311632aaba85f011f4d6306b4e6904d1937 (patch) | |
tree | abf75c205d5c7f28f0da7fd55e75a6c36130141f /libgps_json.c | |
parent | f0680f02af44a8f3a35065a9653bbdb827c7c629 (diff) | |
download | gpsd-62bc9311632aaba85f011f4d6306b4e6904d1937.tar.gz |
Add a 'timestamp' type to the JSON parser to solve a compatibility problem.
Sigh, no other way to get DEVICELIST to recignize both new and old
timestamps.
All regression tests pass.
Diffstat (limited to 'libgps_json.c')
-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 c8976952..c6202b85 100644 --- a/libgps_json.c +++ b/libgps_json.c @@ -299,8 +299,9 @@ static int json_devicelist_read(const char *buf, struct gps_data_t *gpsdata, {"class", t_check, .dflt.check = "DEVICE"}, {"path", t_string, STRUCTOBJECT(struct devconfig_t, path), .len = sizeof(gpsdata->devices.list[0].path)}, + {"activated", t_timestamp, STRUCTOBJECT(struct devconfig_t, activated)}, {"activated", t_real, STRUCTOBJECT(struct devconfig_t, activated)}, - {"flags", t_integer, STRUCTOBJECT(struct devconfig_t, flags)}, + {"flags", t_integer, STRUCTOBJECT(struct devconfig_t, flags)}, {"driver", t_string, STRUCTOBJECT(struct devconfig_t, driver), .len = sizeof(gpsdata->devices.list[0].driver)}, {"subtype", t_string, STRUCTOBJECT(struct devconfig_t, subtype), |