| | 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 | |