Change in ...osmo-ccid-firmware[master]: ccid_slot_fsm: Add msgb_hexdump of TPDU and ATR as it passes by

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.org
Thu Oct 10 13:58:23 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15756 )

Change subject: ccid_slot_fsm: Add msgb_hexdump of TPDU and ATR as it passes by
......................................................................

ccid_slot_fsm: Add msgb_hexdump of TPDU and ATR as it passes by

Change-Id: I347b1a44c51624ca16b0687a92454f96c3cb20ab
---
M ccid_common/ccid_slot_fsm.c
1 file changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c
index 7b513a5..a7ecb9f 100644
--- a/ccid_common/ccid_slot_fsm.c
+++ b/ccid_common/ccid_slot_fsm.c
@@ -87,12 +87,11 @@
 	struct ccid_slot *cs = ss->cs;
 	struct msgb *tpdu, *resp;
 
-	LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%p)\n", __func__, event, cause, data);
-
 	switch (event) {
 	case ISO7816_E_ATR_DONE_IND:
 		tpdu = data;
-		/* FIXME: copy response data over */
+		LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause,
+			msgb_hexdump(tpdu));
 		resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0,
 					   msgb_data(tpdu), msgb_length(tpdu));
 		ccid_slot_send_unbusy(cs, resp);
@@ -100,11 +99,16 @@
 		break;
 	case ISO7816_E_TPDU_DONE_IND:
 		tpdu = data;
-		/* FIXME: copy response data over */
+		LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause,
+			msgb_hexdump(tpdu));
 		resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0, msgb_l2(tpdu), msgb_l2len(tpdu));
 		ccid_slot_send_unbusy(cs, resp);
 		msgb_free(tpdu);
 		break;
+	default:
+		LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n",
+			__func__, event, cause, data);
+		break;
 	}
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15756
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: I347b1a44c51624ca16b0687a92454f96c3cb20ab
Gerrit-Change-Number: 15756
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191010/592e5d1d/attachment.htm>


More information about the gerrit-log mailing list