aboutsummaryrefslogtreecommitdiffstats
path: root/scd/apdu.c
diff options
context:
space:
mode:
Diffstat (limited to 'scd/apdu.c')
-rw-r--r--scd/apdu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index 1dd6427da..44ef445c8 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -2142,6 +2142,11 @@ apdu_open_reader (struct dev_list *dl)
if (readerno < 0 || readerno >= dl->idx_max)
return -1;
+ /* If already opened HANDLE, return -1. */
+ for (slot = 0; slot < MAX_READER; slot++)
+ if (reader_table[slot].used)
+ return -1;
+
dl->idx = readerno;
dl->portstr = NULL;
}