summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/coolkey/slot.cpp19
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) {