scd: handle reader/token removal.
authorNIIBE Yutaka <gniibe@fsij.org>
Sun, 24 Jun 2012 01:45:49 +0000 (10:45 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 25 Jun 2012 01:48:11 +0000 (10:48 +0900)
* scd/apdu.c (pcsc_error_to_sw): PCSC_E_UNKNOWN_READER means
SW_HOST_NO_READER.

scd/apdu.c

index 7641e91..bdc37ca 100644 (file)
@@ -818,6 +818,7 @@ pcsc_error_to_sw (long ec)
     case PCSC_E_CANCELLED:           rc = SW_HOST_ABORTED; break;
     case PCSC_E_NO_MEMORY:           rc = SW_HOST_OUT_OF_CORE; break;
     case PCSC_E_TIMEOUT:             rc = SW_HOST_CARD_IO_ERROR; break;
+    case PCSC_E_UNKNOWN_READER:      rc = SW_HOST_NO_READER; break;
     case PCSC_E_SHARING_VIOLATION:   rc = SW_HOST_LOCKING_FAILED; break;
     case PCSC_E_NO_SMARTCARD:        rc = SW_HOST_NO_CARD; break;
     case PCSC_W_REMOVED_CARD:        rc = SW_HOST_NO_CARD; break;