summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-30 12:05:52 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-30 12:05:52 +0000
commit7345842f42a77c845754f9174882cc5e856827c9 (patch)
tree2c2d11215cc06dcfb2284760b6872d39dfe06a3a /gpsd.c
parent5383e72d8638e6e898511eb601ab7752e0512ad8 (diff)
downloadgpsd-7345842f42a77c845754f9174882cc5e856827c9.tar.gz
Finally give ?TPV; and ?SKY; the axe.
Dealing with all the race conditions implied by the fact that you don't necessarily have a device bound when these are called is just too nasty - it's a maintainability problem and would have been a support nightmare.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/gpsd.c b/gpsd.c
index ed13adfa..75945710 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1618,32 +1618,7 @@ static void handle_newstyle_request(struct subscriber_t *sub,
/*
* Still to be implemented: equivalents of Z $
*/
- if (strncmp(buf, "TPV;", 4) == 0) {
- buf += 4;
- if ((channel=assign_channel(sub, GPS, NULL)) == NULL) {
- (void)strlcpy(reply,
- "{\"class\":ERROR\",\"message\":\"No devices available for TPV.\"}",
- replylen);
- } else if (have_fix(channel))
- (void)strlcpy(reply,
- "{\"class\":ERROR\",\"message\":\"No fix.\"}",
- replylen);
- else
- json_tpv_dump(&channel->device->gpsdata, &channel->fixbuffer,
- reply, replylen);
- } else if (strncmp(buf, "SKY;", 4) == 0) {
- buf += 4;
- if ((channel=assign_channel(sub, GPS, NULL)) == NULL) {
- (void)strlcpy(reply,
- "{\"class\":ERROR\",\"message\":\"No chammels available for SKY.\"}",
- replylen);
- } else if (channel->device->gpsdata.satellites <= 0)
- (void)strlcpy(reply,
- "{\"class\":ERROR\",\"message\":\"No fix.\"}",
- replylen);
- else
- json_sky_dump(&channel->device->gpsdata, reply, replylen);
- } else if (strncmp(buf, "DEVICES;", 8) == 0) {
+ if (strncmp(buf, "DEVICES;", 8) == 0) {
buf += 8;
json_devicelist_dump(reply, replylen);
} else if (strncmp(buf, "WATCH", 5) == 0 && (buf[5] == ';' || buf[5] == '=')) {