summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-24 15:44:06 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-24 15:44:06 -0500
commit34ef11513b243368a9e303e80a0b4f5dbabf1963 (patch)
tree1deea660bbc8ddc2abff74cf86367f205a1555fc
parent404dc3b20f7e091fc0b9d333e643505fb174ac71 (diff)
downloadgpsd-34ef11513b243368a9e303e80a0b4f5dbabf1963.tar.gz
Fix a gpsmon display glitch in client mode.
-rw-r--r--gpsmon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gpsmon.c b/gpsmon.c
index dfa1d490..875e7ca0 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -727,6 +727,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
if (status != 0) {
/* FIXME: figure out why using json_error_string() core dumps */
complain("Ill-formed TOFF packet: %d", status);
+ return;
} else {
/*@-type -noeffect@*/ /* splint is confused about struct timespec */
if (!curses_active)
@@ -738,6 +739,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
(long)session.gpsdata.toff.real.tv_nsec);
/*@+type +noeffect@*/
time_offset = session.gpsdata.toff;
+ return;
}
} else if (!serial && str_starts_with((char*)device->lexer.outbuffer, "{\"class\":\"PPS\",")) {
const char *end = NULL;
@@ -748,7 +750,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
if (status != 0) {
/* FIXME: figure out why using json_error_string() core dumps */
complain("Ill-formed PPS packet: %d", status);
- buf[0] = '\0';
+ return;
} else {
/*@-type -noeffect@*/ /* splint is confused about struct timespec */
struct timespec timedelta;