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, 3 insertions, 2 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index 3bdb509b3..6850aae49 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -713,7 +713,8 @@ pcsc_get_status (int slot, unsigned int *status, int on_wire)
mode. */
if ( (*status & (APDU_CARD_PRESENT|APDU_CARD_ACTIVE))
== (APDU_CARD_PRESENT|APDU_CARD_ACTIVE)
- && !(reader_table[slot].pcsc.current_state & PCSC_STATE_INUSE) )
+ && (opt.pcsc_shared
+ || !(reader_table[slot].pcsc.current_state & PCSC_STATE_INUSE)))
*status |= APDU_CARD_USABLE;
#else
/* Some winscard drivers may set EXCLUSIVE and INUSE at the same
@@ -827,7 +828,7 @@ connect_pcsc_card (int slot)
err = pcsc_connect (reader_table[slot].pcsc.context,
reader_table[slot].rdrname,
- PCSC_SHARE_EXCLUSIVE,
+ opt.pcsc_shared? PCSC_SHARE_SHARED:PCSC_SHARE_EXCLUSIVE,
PCSC_PROTOCOL_T0|PCSC_PROTOCOL_T1,
&reader_table[slot].pcsc.card,
&reader_table[slot].pcsc.protocol);