Changeset 3487

Show
Ignore:
Timestamp:
04/22/08 07:31:48 (9 months ago)
Author:
alonbl
Message:

Add SCARD_E_READER_UNAVAILABLE as acceptable

Location:
branches/alonbl/pnp/src/libopensc
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/alonbl/pnp/src/libopensc/internal-winscard.h

    r3483 r3487  
    5656#define SCARD_E_SHARING_VIOLATION       0x8010000B /**< The smart card cannot be accessed because of other connections outstanding. */ 
    5757#define SCARD_E_NOT_TRANSACTED          0x80100016 /**< An attempt was made to end a non-existent transaction. */ 
     58#define SCARD_E_READER_UNAVAILABLE      0x80100017 /**< The specified reader is not currently available for use. */ 
    5859#define SCARD_E_NO_READERS_AVAILABLE    0x8010002E /**< Cannot find a smart card reader. */ 
    5960#define SCARD_W_UNRESPONSIVE_CARD       0x80100066 /**< The smart card is not responding to a reset. */ 
  • branches/alonbl/pnp/src/libopensc/reader-pcsc.c

    r3484 r3487  
    645645        rv = priv->gpriv->SCardBeginTransaction(pslot->pcsc_card); 
    646646 
    647         if ((unsigned int)rv == SCARD_E_INVALID_HANDLE) { 
     647        if ((unsigned int)rv == SCARD_E_INVALID_HANDLE || (unsigned int)rv == SCARD_E_READER_UNAVAILABLE) { 
    648648                rv = pcsc_connect(reader, slot); 
    649649                if (rv != SCARD_S_SUCCESS) {