From 8b07012f60aeca6fb9c94285443287fc024fe78a 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 2effa8c95..0e52909f4 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -3078,8 +3078,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;