From 62bc9311632aaba85f011f4d6306b4e6904d1937 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 15 Apr 2011 18:39:30 -0400 Subject: 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. --- libgps_json.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgps_json.c') 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), -- cgit v1.2.1