diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-12-22 03:18:52 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-12-26 20:52:18 +0000 |
commit | b9073067c67196b4281ed57d5385a273fdab0406 (patch) | |
tree | 8b336b3e4eb9e9d6437f70c13ca86148ad38bf67 /src | |
parent | 271993c2827974eb7bfbcab8297c3bf3f911b24d (diff) |
layer23/common/sim.c: don't ignore rc of sim_apdu_send()
Change-Id: I8cab7cc72f026947859cc607f65d925803424cf7
Diffstat (limited to 'src')
-rw-r--r-- | src/host/layer23/src/common/sim.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 7f5240dd..9d14cd30 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -186,6 +186,8 @@ void gsm_sim_reply(struct osmocom_ms *ms, uint8_t result_type, uint8_t *result, /* 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 @@ static int sim_apdu_send(struct osmocom_ms *ms, uint8_t *data, uint16_t length) * 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) */ |