summaryrefslogtreecommitdiff
path: root/include/device_proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/device_proto.h')
-rw-r--r--include/device_proto.h7
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