From 6b0afb3761a03d5d345f381f97b5c863e243efb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Redon?= Date: Tue, 24 Sep 2019 17:44:59 +0200 Subject: [PATCH] cardem: fix TPDU state check this change allows to initialize the TPDU state while in ISO_S_WAIT_TPDU, before actually entering ISO_S_TPDU Change-Id: I505d3add32a43de31499b800bc53442f99f65931 --- firmware/libcommon/source/card_emu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index 81a481d8..45e70dce 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -751,7 +751,7 @@ static void set_tpdu_state(struct card_handle *ch, enum tpdu_state new_ts) { if (ch->tpdu.state == new_ts) return; - if (ISO_S_IN_TPDU != ch->state) { + if (ISO_S_IN_TPDU != ch->state && ISO_S_WAIT_TPDU != ch->state) { TRACE_ERROR("%u: setting TPDU state in %s state\r\n", ch->num, get_value_string(iso7816_3_card_state_names, ch->state)); }