scd: Release the card reader after card removal.

* scd/command.c (update_reader_status_file): Call apdu_close_reader.

--
Backport of master commit: 8fe8105576

GnuPG-bug-id: 2651
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2016-09-02 14:45:26 +09:00
parent 5acce7060c
commit 710d0ce0fd
1 changed files with 4 additions and 1 deletions

View File

@ -2315,7 +2315,10 @@ update_reader_status_file (int set_card_removed_flag)
/* Set the card removed flag for all current sessions. */
if (ss->any && ss->status == 0 && set_card_removed_flag)
update_card_removed (idx, 1);
{
apdu_close_reader (ss->slot);
update_card_removed (ss->slot, 1);
}
ss->any = 1;