summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-03-31 19:19:24 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-03-31 19:19:24 -0400
commit2a27bea64b936dffe687ed38f210dddc3ccfc681 (patch)
treed4535f6d40e06961ab6d29cf167654da2a761932 /packet.c
parent4acdd7a9436153ab7ee036a935ee1abb30bcabb0 (diff)
downloadgpsd-2a27bea64b936dffe687ed38f210dddc3ccfc681.tar.gz
Factor out a little function to initiaslize the packet tester properly.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/packet.c b/packet.c
index 3b92a2bd..9eb5f2fd 100644
--- a/packet.c
+++ b/packet.c
@@ -1021,6 +1021,12 @@ static void character_discard(struct gps_packet_t *lexer)
/* entry points begin here */
+void packet_init(struct gps_packet_t *lexer)
+{
+ lexer->char_counter = 0;
+ lexer->retry_counter = 0;
+}
+
void packet_parse(struct gps_packet_t *lexer)
/* grab a packet from the input buffer */
{