mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-17 00:39:50 +02:00
scd: Fix an action after card removal.
* scd/command.c (update_card_removed): Call apdu_close_reader here. -- Backport of master commit:f9e49c80e7
This is update of the commit8fe8105576
It is better apdu_close_reader is called in update_card_removed. The commit1598a44764
introduced a regression, it doesn't close the reader after removal of the card, while the code before the commit call apdu_close_reader in do_reset. So, this fix. GnuPG-bug-id: 2449 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
710d0ce0fd
commit
68d3e461f6
|
@ -200,6 +200,7 @@ update_card_removed (int slot, int value)
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
log_debug ("Removal of a card: %d\n", slot);
|
log_debug ("Removal of a card: %d\n", slot);
|
||||||
|
apdu_close_reader (slot);
|
||||||
application_notify_card_reset (slot);
|
application_notify_card_reset (slot);
|
||||||
slot_table[slot].slot = -1;
|
slot_table[slot].slot = -1;
|
||||||
}
|
}
|
||||||
|
@ -2315,10 +2316,7 @@ update_reader_status_file (int set_card_removed_flag)
|
||||||
|
|
||||||
/* Set the card removed flag for all current sessions. */
|
/* Set the card removed flag for all current sessions. */
|
||||||
if (ss->any && ss->status == 0 && set_card_removed_flag)
|
if (ss->any && ss->status == 0 && set_card_removed_flag)
|
||||||
{
|
update_card_removed (ss->slot, 1);
|
||||||
apdu_close_reader (ss->slot);
|
|
||||||
update_card_removed (ss->slot, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
ss->any = 1;
|
ss->any = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user