Aktiv Co. / Aleksey Samsonov: fix case depending on length.

also no need to null resplen or le (done by sc_format_apdu).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3700 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
aj 2009-06-28 07:17:19 +00:00
parent be526c840f
commit 265eb5923b
1 changed files with 3 additions and 5 deletions

View File

@ -446,11 +446,9 @@ static int iso7816_select_file(sc_card_t *card,
apdu.resp = buf;
apdu.resplen = sizeof(buf);
apdu.le = 256;
} else {
apdu.resplen = 0;
apdu.le = 0;
apdu.cse = SC_APDU_CASE_3_SHORT;
}
} else
apdu.cse = (apdu.lc == 0) ? SC_APDU_CASE_1 : SC_APDU_CASE_3_SHORT;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
if (file_out == NULL) {