Fix: if a card couldnt be read (e.g. inverted upside down), allow to retry it later when asked

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1817 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2004-07-09 15:33:35 +00:00
parent cdee73adff
commit 1c51a8f0dd
1 changed files with 5 additions and 1 deletions

View File

@ -261,7 +261,11 @@ CK_RV slot_get_token(int id, struct sc_pkcs11_slot **slot)
return rv;
if (!((*slot)->slot_info.flags & CKF_TOKEN_PRESENT))
return CKR_TOKEN_NOT_PRESENT;
{
rv = card_detect((*slot)->reader);
if (rv != CKR_OK)
return CKR_TOKEN_NOT_PRESENT;
}
return CKR_OK;
}