Change in osmocom-bb[master]: layer23/common/sim.c: don't ignore rc of sim_apdu_send()

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/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Mon Dec 24 22:09:19 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/12427


Change subject: layer23/common/sim.c: don't ignore rc of sim_apdu_send()
......................................................................

layer23/common/sim.c: don't ignore rc of sim_apdu_send()

Change-Id: I8cab7cc72f026947859cc607f65d925803424cf7
---
M src/host/layer23/src/common/sim.c
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/27/12427/1

diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c
index 7f5240d..9d14cd3 100644
--- a/src/host/layer23/src/common/sim.c
+++ b/src/host/layer23/src/common/sim.c
@@ -186,6 +186,8 @@
 /* send APDU to card reader */
 static int sim_apdu_send(struct osmocom_ms *ms, uint8_t *data, uint16_t length)
 {
+	int rc;
+
 	LOGP(DSIM, LOGL_INFO, "sending APDU (class 0x%02x, ins 0x%02x)\n",
 		data[0], data[1]);
 
@@ -203,13 +205,13 @@
 	 * it makes more sense to do it here then in L1CTL */
 	if (ms->subscr.sim_type == GSM_SIM_TYPE_SAP) {
 		LOGP(DSIM, LOGL_INFO, "Using SAP backend\n");
-		osmosap_send_apdu(ms, data, length);
+		rc = osmosap_send_apdu(ms, data, length);
 	} else {
 		LOGP(DSIM, LOGL_INFO, "Using built-in SIM reader\n");
-		l1ctl_tx_sim_req(ms, data, length);
+		rc = l1ctl_tx_sim_req(ms, data, length);
 	}
 
-	return 0;
+	return rc;
 }
 
 /* dequeue messages (RSL-SAP) */

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cab7cc72f026947859cc607f65d925803424cf7
Gerrit-Change-Number: 12427
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181224/41cd6b10/attachment.htm>


More information about the gerrit-log mailing list