diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-24 15:44:06 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-24 15:44:06 -0500 |
commit | 34ef11513b243368a9e303e80a0b4f5dbabf1963 (patch) | |
tree | 1deea660bbc8ddc2abff74cf86367f205a1555fc | |
parent | 404dc3b20f7e091fc0b9d333e643505fb174ac71 (diff) | |
download | gpsd-34ef11513b243368a9e303e80a0b4f5dbabf1963.tar.gz |
Fix a gpsmon display glitch in client mode.
-rw-r--r-- | gpsmon.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |