diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2008-07-13 09:41:20 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2008-07-13 09:41:20 +0000 |
commit | 6a084b39c8f3081a7a737dbd7c5868a7f63eada4 (patch) | |
tree | 419335d26152f9396e6dd40289e9e8755ec0eb0f /gpspacket.c | |
parent | 78c28e4fdf6e738aa2ec72539c12edad39dc46ce (diff) | |
download | gpsd-6a084b39c8f3081a7a737dbd7c5868a7f63eada4.tar.gz |
Packet state machine now recognizes RTCM3 packets correctly.
Update the packet regression test load.
Introduce new EOF_PACKET type to signal that the packet getter sees EOF.
All regression tests pass.
Diffstat (limited to 'gpspacket.c')
-rw-r--r-- | gpspacket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gpspacket.c b/gpspacket.c index f041017c..e011176b 100644 --- a/gpspacket.c +++ b/gpspacket.c @@ -79,7 +79,7 @@ Lexer_get(LexerObject *self, PyObject *args) return NULL; if (len == 0) { - self->lexer.type = BAD_PACKET; + self->lexer.type = EOF_PACKET; self->lexer.outbuffer[0] = '\0'; self->lexer.outbuflen = 0; } @@ -252,6 +252,7 @@ initgpspacket(void) m = Py_InitModule3("gpspacket", gpspacket_methods, module_doc); PyModule_AddIntConstant(m, "BAD_PACKET", BAD_PACKET); + PyModule_AddIntConstant(m, "EOF_PACKET", EOF_PACKET); PyModule_AddIntConstant(m, "COMMENT_PACKET", COMMENT_PACKET); PyModule_AddIntConstant(m, "NMEA_PACKET", NMEA_PACKET); PyModule_AddIntConstant(m, "SIRF_PACKET", SIRF_PACKET); |