summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-04-01 14:08:26 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-04-01 14:23:25 -0400
commitceba717184bf78aa5435f8051510e7439872e6d5 (patch)
treec80313a89892a50b891d26b3f21e4bc9d64c561a /gpsmon.c
parentc505988baec87349337b61ccf4c2dfe31457a34f (diff)
downloadgpsd-ceba717184bf78aa5435f8051510e7439872e6d5.tar.gz
Improved error messages in gpsmon.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 506ef9f6..76f75354 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -725,8 +725,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
&session.gpsdata,
&end);
if (status != 0) {
- /* FIXME: figure out why using json_error_string() core dumps */
- complain("Ill-formed TOFF packet: %d", status);
+ complain("Ill-formed TOFF packet: %d (%s)", status, json_error_string(status));
return;
} else {
if (!curses_active)
@@ -748,8 +747,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
&noclobber,
&end);
if (status != 0) {
- /* FIXME: figure out why using json_error_string() core dumps */
- complain("Ill-formed PPS packet: %d", status);
+ complain("Ill-formed PPS packet: %d (%s)", status, json_error_string(status));
return;
} else {
struct timespec timedelta;