summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-17 07:19:33 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-17 07:19:33 -0500
commitcc4406a8a545e5adce0561feaa9cce63bfdb0cea (patch)
tree519ed9fc128d51e8ec21b334b2ce7e5049135c2b /packet.c
parent4114a377f4977fed005054049240a6b1e1941f2d (diff)
downloadgpsd-cc4406a8a545e5adce0561feaa9cce63bfdb0cea.tar.gz
Fix kexer to be able to see JSON after NMEA.
The fact that this fix was needed mmay indicate a deeper bug in end-of-packet handling.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index 9942da05..13694965 100644
--- a/packet.c
+++ b/packet.c
@@ -514,7 +514,10 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c)
else if (c == 0xb5) /* LEA-5H can and will output NMEA and UBX back to back */
lexer->state = UBX_LEADER_1;
#endif
- else
+ else if (c == '{') {
+ lexer->state = JSON_LEADER;
+ character_pushback(lexer);
+ } else
lexer->state = GROUND_STATE;
break;
case SEATALK_LEAD_1: