aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2019-09-24 17:44:59 +0200
committerEric Wild <ewild@sysmocom.de>2020-04-10 02:09:40 +0200
commitc3d9fe78c77f1af04e44f934e0dfd19775f24840 (patch)
treeb65d45d34495f33227d20c3243d56093bffa82ed
parent62683222215241cd416bd4d25bd7657e9f049fbe (diff)
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
-rw-r--r--firmware/libcommon/source/card_emu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c
index b5e04e5..48d3d1e 100644
--- a/firmware/libcommon/source/card_emu.c
+++ b/firmware/libcommon/source/card_emu.c
@@ -826,7 +826,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));
}