diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-06-29 12:09:15 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-06-29 12:09:15 +0000 |
commit | 70524d86debc58325f30a828b3ec95deb654ca21 (patch) | |
tree | 455e4310777327d94bf399a4fa77d46fc9fcc746 /packet.c | |
parent | e8491675ce9b228cb918805d5ba2e7837ca51108 (diff) | |
download | gpsd-70524d86debc58325f30a828b3ec95deb654ca21.tar.gz |
Make the test main of the packet getter work again.
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -37,6 +37,7 @@ distinguish them from baud barf. #include <stdarg.h> static int verbose = 0; +static int waiting; void gpsd_report(int errlevel, const char *fmt, ... ) /* assemble command in printf(3) style, use stderr or syslog */ @@ -769,7 +770,8 @@ int main(int argc, char *argv[]) state.inbuflen = 0; memcpy(state.inbufptr = state.inbuffer, mp->test, mp->testlen); gpsd_report(2, "%s starts with state %d\n", mp->legend, mp->initstate); - st = packet_get(&state, mp->testlen); + waiting = mp->testlen; + st = packet_get(&state); if (state.packet_type != mp->type) printf("%s test FAILED (packet type %d wrong).\n", mp->legend, st); else if (memcmp(mp->test + mp->garbage_offset, state.outbuffer, state.outbuflen)) |