summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-21 23:52:36 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-21 23:52:36 +0000
commitb80fb60496e94b8e94f380c7ec9f94fe281501c1 (patch)
treec2560c7a0fdf831073e14759e9fd100df0245870 /gpsd.c
parent1978d039aaa7ccc44a7eeb50a0ddcd93687a8bf2 (diff)
downloadgpsd-b80fb60496e94b8e94f380c7ec9f94fe281501c1.tar.gz
Fix a glitch in dumping of device subtypes.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gpsd.c b/gpsd.c
index 0f822c9f..27b7d5c5 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2303,11 +2303,8 @@ int main(int argc, char *argv[])
#endif /* OLDSTYLE_ENABLE */
#ifdef GPSDNG_ENABLE
{
- char id2[NMEA_MAX];
- (void)snprintf(id2, sizeof(id2),
- "{\"class\":\"DEVICE\",\"path\":\"%s\",\"subtype\":\"%s\"}\r\n",
- device->gpsdata.dev.path,
- device->subtype);
+ char id2[GPS_JSON_RESPONSE_MAX];
+ json_device_dump(device, id2, sizeof(id2));
notify_watchers(device, true, id2);
}
#endif /* GPSDNG_ENABLE */