diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-05-13 14:19:37 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-05-13 14:19:37 +0200 |
commit | b307e84b5d67419a9fbec6e222ff51d2f917d928 (patch) | |
tree | 7cf82f8450518ecbaa3df9d71dfa13ac10313a31 /include | |
parent | ad1d4605fdafc44fcba1bef57b874759f18a94e6 (diff) | |
download | libnitrokey-b307e84b5d67419a9fbec6e222ff51d2f917d928.tar.gz libnitrokey-b307e84b5d67419a9fbec6e222ff51d2f917d928.tar.bz2 |
Log accepting responses with invalid CRC
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/device_proto.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/device_proto.h b/include/device_proto.h index 0d355ce..b557384 100644 --- a/include/device_proto.h +++ b/include/device_proto.h @@ -352,6 +352,13 @@ namespace nitrokey { clear_packet(outp); + if (!resp.isCRCcorrect()) + LOGD(std::string("Accepting response from device with invalid CRC. ") + + "Command ID: " + std::to_string(resp.command_id) + " " + + commandid_to_string(static_cast<CommandID>(resp.command_id)) + ); + + if (status <= 0) { dev->m_counters.receiving_error++; throw DeviceReceivingFailure( //FIXME replace with CriticalErrorException |