Bug fix: let sc_transmit_apdu() returns a negative number or 0 (no positive number)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1248 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
473a701c80
commit
df89427bfb
|
@ -230,7 +230,11 @@ int sc_transmit_apdu(struct sc_card *card, struct sc_apdu *apdu)
|
|||
}
|
||||
r = card->ops->get_response(card, apdu, le);
|
||||
sc_unlock(card);
|
||||
return r;
|
||||
if (r < 0) {
|
||||
SC_FUNC_RETURN(card->ctx, 2, r);
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
sc_unlock(card);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue