From b307e84b5d67419a9fbec6e222ff51d2f917d928 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 13 May 2017 14:19:37 +0200 Subject: Log accepting responses with invalid CRC Signed-off-by: Szczepan Zalega --- include/device_proto.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') 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(resp.command_id)) + ); + + if (status <= 0) { dev->m_counters.receiving_error++; throw DeviceReceivingFailure( //FIXME replace with CriticalErrorException -- cgit v1.2.3