Marcus Brinkmann <marcus@g10code.com>

* apdu.c (pcsc_get_status): Be more relaxed with the usable flag
        under Windows.

M    scd/ChangeLog
M    scd/apdu.c
This commit is contained in:
Marcus Brinkmann 2008-09-23 13:04:42 +00:00
parent 2693db33d0
commit 8368144fa7
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-09-23 Marcus Brinkmann <marcus@g10code.com>
* apdu.c (pcsc_get_status): Be more relaxed with the usable flag
under Windows.
2008-09-23 Werner Koch <wk@g10code.com>
* app-openpgp.c (do_setattr): Use command chaining for long

View File

@ -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*/