scd: Fix for card change returning GPG_ERR_CARD_RESET.
authorWerner Koch <wk@gnupg.org>
Mon, 19 Dec 2011 17:26:47 +0000 (18:26 +0100)
committerWerner Koch <wk@gnupg.org>
Mon, 19 Dec 2011 17:26:47 +0000 (18:26 +0100)
* scd/apdu.c (apdu_connect): Do not test for zero atrlen.
--
When gpg-agent prompts for insertion of a card this error would be
returned.

Co-authored-by: Ben Kibbey <bjk@luxsci.net>
scd/apdu.c

index 5a51846..f470075 100644 (file)
@@ -3150,8 +3150,7 @@ apdu_connect (int slot)
     ;
   else if (!(status & APDU_CARD_PRESENT))
     sw = SW_HOST_NO_CARD;
-  else if (((status & APDU_CARD_PRESENT) && !(status & APDU_CARD_ACTIVE))
-           || !reader_table[slot].atrlen)
+  else if ((status & APDU_CARD_PRESENT) && !(status & APDU_CARD_ACTIVE))
     sw = SW_HOST_CARD_INACTIVE;
 
   if (DBG_READER)