From f4b7f7146349c388a2f3ce224ff2006606c66232 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 19 Dec 2011 18:26:47 +0100 Subject: [PATCH] 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 --- scd/apdu.c | 3 +-- 1 file changed, 1 insertion(+), 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)