diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-10-09 15:27:35 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-10-09 15:27:35 +0200 |
commit | ea70b9953faaf9155b60400e306c71432a049d94 (patch) | |
tree | e31e867700f662ea3ddc8f74aa0800d3cb096478 /src/etianalyse.cpp | |
parent | 4bc1c0cf3e8c5dcc72a4bf971f0b78bbbe35cc57 (diff) | |
download | etisnoop-ea70b9953faaf9155b60400e306c71432a049d94.tar.gz etisnoop-ea70b9953faaf9155b60400e306c71432a049d94.tar.bz2 etisnoop-ea70b9953faaf9155b60400e306c71432a049d94.zip |
Add -e option
Diffstat (limited to 'src/etianalyse.cpp')
-rw-r--r-- | src/etianalyse.cpp | 74 |
1 files changed, 39 insertions, 35 deletions
diff --git a/src/etianalyse.cpp b/src/etianalyse.cpp index df7eca0..8ba1924 100644 --- a/src/etianalyse.cpp +++ b/src/etianalyse.cpp @@ -458,25 +458,27 @@ void ETI_Analyser::eti_analyse() strprintf("Mismatch: %04x %04x", crc, figcrc)); } - printvalue("FIGs", 3); - - bool endmarker = false; - int figcount = 0; - while (!endmarker) { - uint8_t figtype, figlen; - figtype = (fig[0] & 0xE0) >> 5; - if (figtype != 7) { - figlen = fig[0] & 0x1F; - - printsequencestart(4); - decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); - fig += figlen + 1; - figcount += figlen + 1; - if (figcount >= 29) + if (crccorrect or config.ignore_error) { + printvalue("FIGs", 3); + + bool endmarker = false; + int figcount = 0; + while (!endmarker) { + uint8_t figtype, figlen; + figtype = (fig[0] & 0xE0) >> 5; + if (figtype != 7) { + figlen = fig[0] & 0x1F; + + printsequencestart(4); + decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); + fig += figlen + 1; + figcount += figlen + 1; + if (figcount >= 29) + endmarker = true; + } + else { endmarker = true; - } - else { - endmarker = true; + } } } @@ -698,26 +700,28 @@ void ETI_Analyser::fic_analyse() strprintf("Mismatch: %04x %04x", crc, figcrc)); } - printvalue("FIGs", 3); + if (crccorrect or config.ignore_error) { + printvalue("FIGs", 3); - uint8_t *fig = fib; - bool endmarker = false; - int figcount = 0; - while (!endmarker) { - uint8_t figtype, figlen; - figtype = (fig[0] & 0xE0) >> 5; - if (figtype != 7) { - figlen = fig[0] & 0x1F; + uint8_t *fig = fib; + bool endmarker = false; + int figcount = 0; + while (!endmarker) { + uint8_t figtype, figlen; + figtype = (fig[0] & 0xE0) >> 5; + if (figtype != 7) { + figlen = fig[0] & 0x1F; - printsequencestart(4); - decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); - fig += figlen + 1; - figcount += figlen + 1; - if (figcount >= 29) + printsequencestart(4); + decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); + fig += figlen + 1; + figcount += figlen + 1; + if (figcount >= 29) + endmarker = true; + } + else { endmarker = true; - } - else { - endmarker = true; + } } } |