scd: Fix for card change returning GPG_ERR_CARD_RESET.

* 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>
This commit is contained in:
Werner Koch 2011-12-19 18:26:47 +01:00
parent f6251c0d0a
commit f4b7f71463
1 changed files with 1 additions and 2 deletions

View 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)