Change in simtrace2[master]: card_emu: explicitly initialize PTS and TPDU states

laforge gerrit-no-reply at lists.osmocom.org
Thu Apr 8 21:28:41 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/23642 )

Change subject: card_emu: explicitly initialize PTS and TPDU states
......................................................................

card_emu: explicitly initialize PTS and TPDU states

Those are already initialized at various transitions of the master
7816 FSM, but let's properly initialize them at start-up, too.

Change-Id: I81b2a8ef3284559164700d94717e4ccf008f53df
---
M firmware/libcommon/source/card_emu.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c
index 216ffe3..0ba6eb0 100644
--- a/firmware/libcommon/source/card_emu.c
+++ b/firmware/libcommon/source/card_emu.c
@@ -1264,6 +1264,9 @@
 	ch->atr.len = sizeof(default_atr);
 	memcpy(ch->atr.atr, default_atr, ch->atr.len);
 
+	ch->pts.state = PTS_S_WAIT_REQ_PTSS;
+	ch->tpdu.state = TPDU_S_WAIT_CLA;
+
 	card_handle_reset(ch);
 
 	tc_etu_init(ch->tc_chan, ch);

-- 
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/23642
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I81b2a8ef3284559164700d94717e4ccf008f53df
Gerrit-Change-Number: 23642
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: tsaitgaist <kredon at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210408/61dda45b/attachment.htm>


More information about the gerrit-log mailing list