diff options
author | Alon Levy <alevy@redhat.com> | 2012-03-22 13:24:15 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-03-22 20:10:27 +0200 |
commit | 446d97c0883eb659125240b64eeced23016626d7 (patch) | |
tree | db6cfca2609398858d1c7155a49081e52e4bfcd0 /src | |
parent | 117d960a4c91c9fdc266aa2ec5fdf5f797a59747 (diff) |
SlotList::updateReaderList: don't create a fake E-Gate reader
Diffstat (limited to 'src')
-rw-r--r-- | src/coolkey/slot.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/coolkey/slot.cpp b/src/coolkey/slot.cpp index 0c69826..a5f550b 100644 --- a/src/coolkey/slot.cpp +++ b/src/coolkey/slot.cpp @@ -247,27 +247,10 @@ SlotList::updateReaderList() } - if (!readerStates) { + if (readerStates == NULL && readerNames != NULL) { /* fresh Reader State list, just create it */ readerStates = CKYReader_CreateArray(readerNames, (CKYSize *)&numReaders); - /* if we have no readers, make sure we have at least one to keep things - * happy */ - if (readerStates == NULL && - CKYReaderNameList_GetCount(readerNames) == 0) { - readerStates = (SCARD_READERSTATE *) - malloc(sizeof(SCARD_READERSTATE)); - if (readerStates) { - CKYReader_Init(readerStates); - status = CKYReader_SetReaderName(readerStates, "E-Gate 0 0"); - if (status != CKYSUCCESS) { - CKYReader_DestroyArray(readerStates, 1); - readerStates = NULL; - } else { - numReaders = 1; - } - } - } CKYReaderNameList_Destroy(readerNames); if (readerStates == NULL) { |