Changeset 3483
- Timestamp:
- 04/20/08 23:23:26 (6 months ago)
- Location:
- branches/alonbl/pnp/src/libopensc
- Files:
-
- 2 modified
-
internal-winscard.h (modified) (1 diff)
-
reader-pcsc.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/alonbl/pnp/src/libopensc/internal-winscard.h
r3460 r3483 52 52 53 53 #define SCARD_S_SUCCESS 0x00000000 /**< No error was encountered. */ 54 #define SCARD_E_INVALID_HANDLE 0x80100003 /**< The supplied handle was invalid. */ 54 55 #define SCARD_E_TIMEOUT 0x8010000A /**< The user-specified timeout value has expired. */ 55 56 #define SCARD_E_SHARING_VIOLATION 0x8010000B /**< The smart card cannot be accessed because of other connections outstanding. */ -
branches/alonbl/pnp/src/libopensc/reader-pcsc.c
r3481 r3483 645 645 rv = priv->gpriv->SCardBeginTransaction(pslot->pcsc_card); 646 646 647 if ((unsigned int)rv == SCARD_E_INVALID_HANDLE) { 648 rv = pcsc_connect(reader, slot); 649 if (rv != SCARD_S_SUCCESS) { 650 PCSC_ERROR(reader->ctx, "SCardConnect failed", rv); 651 return pcsc_ret_to_error(rv); 652 } 653 /* STRANGE-BEGIN */ 654 rv = priv->gpriv->SCardEndTransaction(pslot->pcsc_card, SCARD_RESET_CARD); 655 /* Now try to begin a new transaction after we reconnected and we fail if 656 some other program was faster to lock the reader */ 657 /* rv = priv->gpriv->SCardBeginTransaction(pslot->pcsc_card); 658 */ 659 /* STRANGE-END */ 660 } 661 647 662 if ((unsigned int)rv == SCARD_W_RESET_CARD) { 648 663 /* try to reconnect if the card was reset by some other application */
