summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-09-10 21:05:42 +0200
committerHarald Welte <laforge@gnumonks.org>2014-10-26 19:09:22 +0100
commita5c9255baa0dd97b564ea8d44444ac80c38153b9 (patch)
treee560df400e42937b1cb1216859d6c86bd1a3ec58 /utils
parent495fe2682c37d7e2ba9d969fa0675e59db461790 (diff)
sim: strip the SW from the returned data, as SW is passed in msgb->cb
Diffstat (limited to 'utils')
-rw-r--r--utils/osmo-sim-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c
index f7dc48d8..482ca31e 100644
--- a/utils/osmo-sim-test.c
+++ b/utils/osmo-sim-test.c
@@ -164,7 +164,7 @@ static int dump_fcp_template_msg(struct msgb *msg)
struct tlv_parsed tp;
int rc;
- rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-4, 0, 0);
+ rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0);
if (rc < 0)
return rc;
@@ -223,7 +223,7 @@ static struct msgb *try_select_adf_usim(struct osim_chan_hdl *st)
int rc, i;
msg = select_file(st, 0x2f00);
- rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-4, 0, 0);
+ rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0);
if (rc < 0)
return NULL;
@@ -302,7 +302,7 @@ static int dump_file(struct osim_chan_hdl *chan, uint16_t fid)
goto out;
}
- rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-4, 0, 0);
+ rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0);
if (rc < 0) {
printf("Unable to parse FCP\n");
goto out;