This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/21070 )
Change subject: ccid: do not allow xfers with inactive slots
......................................................................
ccid: do not allow xfers with inactive slots
pcscd tries to do this if the previous command led to a deactivation...
Change-Id: If2659c7d5e8784e5e4393d5b12589e96d517168a
---
M ccid_common/ccid_device.c
M ccid_common/ccid_slot_fsm.c
2 files changed, 6 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c
index fe21414..7819d41 100644
--- a/ccid_common/ccid_device.c
+++ b/ccid_common/ccid_device.c
@@ -462,7 +462,7 @@
/* handle this asynchronously */
rc = cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block);
- if (rc < 0) {
+ if (rc <= 0) {
msgb_trim(msg, sizeof(struct ccid_rdr_to_pc_data_block));
resp = ccid_gen_data_block(cs, u->xfr_block.hdr.bSeq, CCID_CMD_STATUS_FAILED, -rc, 0, 0);
goto out;
diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c
index af5b713..043fa8f 100644
--- a/ccid_common/ccid_slot_fsm.c
+++ b/ccid_common/ccid_slot_fsm.c
@@ -302,12 +302,16 @@
if (msgb_length(msg) != xfb->hdr.dwLength + 10)
return -1;
+ /* might be unpowered after failed ppss that led to reset */
+ if (cs->icc_powered != true)
+ return -0;
+
msgb_pull(msg, 10);
LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(msg));
osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, msg);
/* continues in iso_fsm_clot_user_cb once response/error/timeout is received */
- return 0;
+ return 1;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/21070
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: If2659c7d5e8784e5e4393d5b12589e96d517168a
Gerrit-Change-Number: 21070
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: rousseau <ludovic.rousseau+osmocom at free.fr>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201109/670df89b/attachment.htm>