diff options
Diffstat (limited to '')
-rw-r--r-- | scd/ChangeLog | 5 | ||||
-rw-r--r-- | scd/apdu.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/scd/ChangeLog b/scd/ChangeLog index 2de918bb0..4a52f69eb 100644 --- a/scd/ChangeLog +++ b/scd/ChangeLog @@ -1,3 +1,8 @@ +2008-09-23 Marcus Brinkmann <[email protected]> + + * apdu.c (pcsc_get_status): Be more relaxed with the usable flag + under Windows. + 2008-09-23 Werner Koch <[email protected]> * app-openpgp.c (do_setattr): Use command chaining for long diff --git a/scd/apdu.c b/scd/apdu.c index 171c7a63a..5c1c699b4 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -1082,12 +1082,19 @@ pcsc_get_status (int slot, unsigned int *status) *status |= 2; if ( !(rdrstates[0].event_state & PCSC_STATE_MUTE) ) *status |= 4; +#ifndef HAVE_W32_SYSTEM /* We indicate a useful card if it is not in use by another application. This is because we only use exclusive access mode. */ if ( (*status & 6) == 6 && !(rdrstates[0].event_state & PCSC_STATE_INUSE) ) *status |= 1; +#else + /* Some winscard drivers may set EXCLUSIVE and INUSE at the same + time when we are the only user (SCM SCR335) under Windows. */ + if ((status & 6) == 6) + status |= 1; +#endif return 0; #endif /*!NEED_PCSC_WRAPPER*/ |