summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-12-19 18:26:47 +0100
committerWerner Koch <wk@gnupg.org>2011-12-19 18:26:47 +0100
commitf4b7f7146349c388a2f3ce224ff2006606c66232 (patch)
tree541747020e5e9bf62c559c3116af781d73eb275c
parentDon't kill pinentry by SIGKILL but let it quit by SIGINT. (diff)
downloadgnupg2-f4b7f7146349c388a2f3ce224ff2006606c66232.tar.xz
gnupg2-f4b7f7146349c388a2f3ce224ff2006606c66232.zip
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>
-rw-r--r--scd/apdu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index 5a518465c..f47007551 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -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)