Overview
Comment: | Updated to call SCardDisconnect if we detect a previously connected slot -- this fixes a regression in the previous commit where a smartcard would not function after being inserted, removed, and reinserted |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
84aaf35a0e80fcd1aeab5197c3c576b1 |
User & Date: | rkeene on 2010-07-23 21:58:27 |
Other Links: | manifest | tags |
Context
2010-07-23
| ||
22:03 | CACKey 0.5.17 check-in: 45a6d087db user: rkeene tags: 0.5.17, trunk | |
21:58 | Updated to call SCardDisconnect if we detect a previously connected slot -- this fixes a regression in the previous commit where a smartcard would not function after being inserted, removed, and reinserted check-in: 84aaf35a0e user: rkeene tags: trunk | |
21:46 |
Consolidated slot resetting into a single function.
Updated slot resetting to invalidate slot PC/SC handle. check-in: 1edf82bc16 user: rkeene tags: trunk | |
Changes
Modified cackey.c from [6b202c653c] to [831193de85].
︙ | ︙ | |||
839 840 841 842 843 844 845 846 847 848 849 850 851 852 | */ static void cackey_mark_slot_reset(struct cackey_slot *slot) { if (slot == NULL) { return; } CACKEY_DEBUG_PRINTF("Called."); slot->slot_reset = 1; slot->pcsc_card_connected = 0; slot->token_flags = CKF_LOGIN_REQUIRED; CACKEY_DEBUG_PRINTF("Returning."); | > > > > | 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | */ static void cackey_mark_slot_reset(struct cackey_slot *slot) { if (slot == NULL) { return; } CACKEY_DEBUG_PRINTF("Called."); if (slot->pcsc_card_connected) { SCardDisconnect(slot->pcsc_card, SCARD_LEAVE_CARD); } slot->slot_reset = 1; slot->pcsc_card_connected = 0; slot->token_flags = CKF_LOGIN_REQUIRED; CACKEY_DEBUG_PRINTF("Returning."); |
︙ | ︙ |