pkcs11: resolve problem 'change 5421 breaks MIT Kerberos login', thanks to Douglas.

http://www.opensc-project.org/pipermail/opensc-devel/2011-June/016734.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5537 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
vtarasov 2011-06-02 17:20:10 +00:00
parent 3095f5479f
commit b3cbf5453e
1 changed files with 3 additions and 1 deletions

View File

@ -400,7 +400,9 @@ CK_RV C_GetSlotList(CK_BBOOL tokenPresent, /* only slots with token prese
* - any slot with token;
* - without token(s), one empty slot per reader;
*/
if (!slot->reader || (!tokenPresent && slot->reader != prev_reader) || (slot->slot_info.flags & CKF_TOKEN_PRESENT))
if ((!tokenPresent && !slot->reader)
|| (!tokenPresent && slot->reader != prev_reader)
|| (slot->slot_info.flags & CKF_TOKEN_PRESENT))
found[numMatches++] = slot->id;
prev_reader = slot->reader;
}