aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2021-05-14 03:51:22 +0000
committerNIIBE Yutaka <[email protected]>2021-05-14 03:51:22 +0000
commitf3c6dc1cd141c3b6ff95dd656ef2a62a5ff8766a (patch)
tree2f6316c9ca98391421914a96f3345bae5238eea2
parentscd: Fix possible race for watching thread doesn't exit. (diff)
downloadgnupg-gniibe/pcsc-get-status.tar.gz
gnupg-gniibe/pcsc-get-status.zip
scd: Handle error of SCardStatus.gniibe/pcsc-get-status
* scd/apdu.c (pcsc_get_status): On removal, it may return PCSC_E_INVALID_VALUE. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--scd/apdu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index 0d7ee777d..a5a0a351e 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -699,6 +699,8 @@ pcsc_get_status (int slot, unsigned int *status, int on_wire)
{
log_error ("pcsc_status failed: %s (0x%lx)\n",
pcsc_error_string (err), err);
+ if (err == PCSC_E_INVALID_VALUE)
+ err = PCSC_E_NO_SMARTCARD;
return pcsc_error_to_sw (err);
}