diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-28 11:24:39 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-28 11:24:39 +0100 |
commit | 844532b93021ecc9f0f5dabbc00f8965f088c54b (patch) | |
tree | 48d107cc848f8c63bba9db1e4e7d0cb12c4b4d99 /lib/edi/common.cpp | |
parent | 04e1872b5373a4b0bde548e9e42a6c2fc74c7e5d (diff) | |
download | dabmod-844532b93021ecc9f0f5dabbc00f8965f088c54b.tar.gz dabmod-844532b93021ecc9f0f5dabbc00f8965f088c54b.tar.bz2 dabmod-844532b93021ecc9f0f5dabbc00f8965f088c54b.zip |
common ea3156f: EDI input: Do not print sequence error on first packet
Diffstat (limited to 'lib/edi/common.cpp')
-rw-r--r-- | lib/edi/common.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/edi/common.cpp b/lib/edi/common.cpp index 3005802..306261a 100644 --- a/lib/edi/common.cpp +++ b/lib/edi/common.cpp @@ -264,9 +264,15 @@ decode_state_t TagDispatcher::decode_afpacket( } // SEQ wraps at 0xFFFF, unsigned integer overflow is intentional - const uint16_t expected_seq = m_last_seq + 1; - if (expected_seq != seq) { - etiLog.level(warn) << "EDI AF Packet sequence error, " << seq; + if (m_last_seq_valid) { + const uint16_t expected_seq = m_last_seq + 1; + if (expected_seq != seq) { + etiLog.level(warn) << "EDI AF Packet sequence error, " << seq; + } + } + else { + etiLog.level(info) << "EDI AF Packet initial sequence number: " << seq; + m_last_seq_valid = true; } m_last_seq = seq; |