scd: Release the card reader after card removal.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 2 Sep 2016 05:45:26 +0000 (14:45 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 2 Sep 2016 05:45:26 +0000 (14:45 +0900)
* scd/command.c (update_reader_status_file): Call apdu_close_reader.

--

GnuPG-bug-id: 2651
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/command.c

index 239480b..2909330 100644 (file)
@@ -2340,7 +2340,10 @@ update_reader_status_file (int set_card_removed_flag)
 
           /* Set the card removed flag for all current sessions.  */
           if (vr->any && vr->status == 0 && set_card_removed_flag)
-            update_card_removed (idx, 1);
+           {
+              apdu_close_reader (vr->slot);
+              update_card_removed (idx, 1);
+           }
 
           vr->any = 1;