diff options
author | Josh Allen <axlecrusher@gmail.com> | 2017-02-12 11:09:38 -0500 |
---|---|---|
committer | Josh Allen <axlecrusher@gmail.com> | 2017-02-12 11:09:38 -0500 |
commit | 6ad28759408695a4825738bcc32bc294d1869ca8 (patch) | |
tree | d3ca23bad81ad136dada426659c9b8c52d0453b0 /tools/ootx_decode/ootx_decoder.c | |
parent | ac556ccbb2ecd419773b3ad941f7aea78a191381 (diff) | |
download | libsurvive-6ad28759408695a4825738bcc32bc294d1869ca8.tar.gz libsurvive-6ad28759408695a4825738bcc32bc294d1869ca8.tar.bz2 |
handler for bad crc32
Diffstat (limited to 'tools/ootx_decode/ootx_decoder.c')
-rw-r--r-- | tools/ootx_decode/ootx_decoder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/ootx_decode/ootx_decoder.c b/tools/ootx_decode/ootx_decoder.c index 36f93fe..dc5d50a 100644 --- a/tools/ootx_decode/ootx_decoder.c +++ b/tools/ootx_decode/ootx_decoder.c @@ -16,7 +16,7 @@ #define MAX_BUFF_SIZE 1024 void (*ootx_packet_clbk)(ootx_packet* packet) = NULL; -void (*ootx_bad_crc_clbk)(ootx_packet* packet) = NULL; +void (*ootx_bad_crc_clbk)(ootx_packet* packet, uint32_t crc) = NULL; void ootx_pump_bit(ootx_decoder_context *ctx, uint8_t dbit); @@ -194,7 +194,7 @@ void ootx_pump_bit(ootx_decoder_context *ctx, uint8_t dbit) { crc = crc32( crc, op.data,op.length); if (crc != op.crc32) { - if (ootx_bad_crc_clbk != NULL) ootx_bad_crc_clbk(&op); + if (ootx_bad_crc_clbk != NULL) ootx_bad_crc_clbk(&op,crc); } else if (ootx_packet_clbk != NULL) { ootx_packet_clbk(&op); |