summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-11-30 10:42:53 +0200
committerAlon Levy <alevy@redhat.com>2010-12-09 13:36:19 +0200
commitbda3dc4aabcbb64d552dd0d3030cfbe93529a576 (patch)
tree8195f110bd2921844906d06dc8f95882d3cd06ad
parent5ef30c3ce7216945c6116b1e9c059dcb64ca9bc3 (diff)
libcaccard: undo wrong fix to passthru_get_reader_state
-rw-r--r--passthru.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/passthru.c b/passthru.c
index 5c2c7bd..09471c7 100644
--- a/passthru.c
+++ b/passthru.c
@@ -332,6 +332,10 @@ passthru_get_reader_state(SCARD_READERSTATE_A *reader_states,
int i;
for (i=0; i < reader_count; i++) {
+ if (name == NULL && reader_states[i].szReader == NULL) {
+ // looking for a blank slot to return
+ return &reader_states[i];
+ }
if (name == NULL || reader_states[i].szReader == NULL) {
continue;
}