diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-29 15:59:44 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-29 15:59:44 +0000 |
commit | 42bbb63a1b66ee64e297d432689833d970a16ed8 (patch) | |
tree | 78e76124e050f61aa5e94654a4b50ce4c25c7d45 /json.c | |
parent | 6a5a1aff88d18b55895714e2241237ed3abc6f1b (diff) | |
download | gpsd-42bbb63a1b66ee64e297d432689833d970a16ed8.tar.gz |
New-style WATCH command is working...
...at least for the simplest case ?WATCH={"TPV":true}. More testing
will follow.
Diffstat (limited to 'json.c')
-rw-r--r-- | json.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -62,7 +62,9 @@ int json_read_object(const char *cp, const struct json_attr_t *attrs, int offset cursor->addr.string.ptr[offset] = '\0'; break; case boolean: - cursor->addr.boolean[offset] = cursor->dflt.boolean; + /* nullbool default says not to set the value at all */ + if (cursor->dflt.boolean != nullbool) + cursor->addr.boolean[offset] = cursor->dflt.boolean; break; case object: /* silences a compiler warning */ case array: |