diff --git a/scd/apdu.c b/scd/apdu.c index 6850aae49..ccb5c10b0 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -229,6 +229,7 @@ static npth_mutex_t reader_table_lock; #define PCSC_E_NOT_TRANSACTED 0x80100016 #define PCSC_E_READER_UNAVAILABLE 0x80100017 #define PCSC_E_NO_SERVICE 0x8010001D +#define PCSC_E_NO_READERS_AVAILABLE 0x8010002E #define PCSC_E_SERVICE_STOPPED 0x8010001E #define PCSC_W_RESET_CARD 0x80100068 #define PCSC_W_REMOVED_CARD 0x80100069 @@ -604,6 +605,7 @@ pcsc_error_string (long err) case 0x001c: s = "card unsupported"; break; case 0x001d: s = "no service"; break; case 0x001e: s = "service stopped"; break; + case 0x002e: s = "no readers available"; break; default: s = "unknown PC/SC error code"; break; } return s; diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 862278b5c..5491556c6 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -1221,7 +1221,7 @@ scd_kick_the_loop (void) #else int ret = kill (main_thread_pid, SIGCONT); if (ret < 0) - log_error ("SetEvent for scd_kick_the_loop failed: %s\n", + log_error ("sending signal for scd_kick_the_loop failed: %s\n", gpg_strerror (gpg_error_from_syserror ())); #endif } @@ -1277,6 +1277,8 @@ handle_connections (int listen_fd) events[0] = the_event = INVALID_HANDLE_VALUE; events[1] = INVALID_HANDLE_VALUE; + /* Create event for manual reset, initially non-signaled. Make it + * waitable and inheritable. */ h = CreateEvent (&sa, TRUE, FALSE, NULL); if (!h) log_error ("can't create scd event: %s\n", w32_strerror (-1) );