From 5ae6ef44950951f74c0c7ef28c44a0b32e4da3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 8 Apr 2014 12:00:04 -0400 Subject: [PATCH] channels/smartcard: fix GetStatusChange SCARD_E_TIMEOUT handling --- channels/smartcard/client/smartcard_operations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/smartcard/client/smartcard_operations.c b/channels/smartcard/client/smartcard_operations.c index 299c070fc..cd13a11a1 100644 --- a/channels/smartcard/client/smartcard_operations.c +++ b/channels/smartcard/client/smartcard_operations.c @@ -351,7 +351,7 @@ static UINT32 smartcard_GetStatusChangeA(SMARTCARD_DEVICE* smartcard, IRP* irp) status = ret.ReturnCode = SCardGetStatusChangeA(hContext, call.dwTimeOut, rgReaderStates, call.cReaders); - if (status) + if (status && (status != SCARD_E_TIMEOUT)) return status; ret.cReaders = call.cReaders; @@ -424,7 +424,7 @@ static UINT32 smartcard_GetStatusChangeW(SMARTCARD_DEVICE* smartcard, IRP* irp) status = ret.ReturnCode = SCardGetStatusChangeW(hContext, call.dwTimeOut, rgReaderStates, call.cReaders); - if (status) + if (status && (status != SCARD_E_TIMEOUT)) return status; ret.cReaders = call.cReaders; @@ -1292,7 +1292,7 @@ void smartcard_irp_device_control(SMARTCARD_DEVICE* smartcard, IRP* irp) break; } - if ((result != SCARD_S_SUCCESS) /* && (result != SCARD_E_TIMEOUT) */) + if ((result != SCARD_S_SUCCESS) && (result != SCARD_E_TIMEOUT)) { WLog_Print(smartcard->log, WLOG_WARN, "IRP failure: %s (0x%08X), status: %s (0x%08X)",