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:
sth 2003-07-11 09:40:49 +00:00
parent 473a701c80
commit df89427bfb
1 changed files with 5 additions and 1 deletions

View File

@ -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;