summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-11 16:06:11 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-11 16:06:11 +0000
commitf55757cf2dabd99e75895a2808763dc9098b963e (patch)
tree28297c24f6aacf8b4c10606e13b317fba3865120 /gpsd_json.c
parent72f71599cb2175603f39625f09e6339362be4d4e (diff)
downloadgpsd-f55757cf2dabd99e75895a2808763dc9098b963e.tar.gz
J command and switch are gone.
Now that we have reliable end-of-cycle detection in NMEA, we can always clear the fixbuffer at start of cycle and accumulate data until we transmit at end of cycle. Accordingly, there is no longer any bneed for users to choose between jittery-but-correct and buffered-but-laggy reports. Accordingly, the daemon 'J' command is no longer necessary. All the client side options and commands connected with it can go away too.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 03cf9291..23971898 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -280,10 +280,9 @@ void json_watch_dump(const struct policy_t *ccp,
{
/*@-compdef@*/
(void)snprintf(reply+strlen(reply), replylen-strlen(reply),
- "{\"class\":\"WATCH\",\"enable\":%s,\"raw\":%d,\"buffer_policy\":%d,\"scaled\":%s}\r\n",
+ "{\"class\":\"WATCH\",\"enable\":%s,\"raw\":%d,\"scaled\":%s}\r\n",
ccp->watcher ? "true" : "false",
ccp->raw,
- ccp->buffer_policy,
ccp->scaled ? "true" : "false");
/*@+compdef@*/
}
@@ -1214,15 +1213,12 @@ int json_watch_read(const char *buf,
/*@out@*/struct policy_t *ccp,
/*@null@*/const char **endptr)
{
- int intcasoc = -1;
/*@ -fullinitblock @*/
struct json_attr_t chanconfig_attrs[] = {
{"enable", boolean, .addr.boolean = &ccp->watcher,
.dflt.boolean = true},
{"raw", integer, .addr.integer = &ccp->raw,
.nodefault = true},
- {"buffer_policy", integer, .addr.integer = &intcasoc,
- .dflt.integer = -1},
{"scaled", boolean, .addr.boolean = &ccp->scaled},
{NULL},
};
@@ -1230,10 +1226,6 @@ int json_watch_read(const char *buf,
int status;
status = json_read_object(buf, chanconfig_attrs, endptr);
- if (status == 0) {
- if (intcasoc != -1)
- ccp->buffer_policy = intcasoc;
- }
return status;
}