channels/smartcard: fix GetStatusChange SCARD_E_TIMEOUT handling

This commit is contained in:
Marc-André Moreau 2014-04-08 12:00:04 -04:00
parent ca1ec811e8
commit 5ae6ef4495

View File

@ -351,7 +351,7 @@ static UINT32 smartcard_GetStatusChangeA(SMARTCARD_DEVICE* smartcard, IRP* irp)
status = ret.ReturnCode = SCardGetStatusChangeA(hContext, call.dwTimeOut, rgReaderStates, call.cReaders); status = ret.ReturnCode = SCardGetStatusChangeA(hContext, call.dwTimeOut, rgReaderStates, call.cReaders);
if (status) if (status && (status != SCARD_E_TIMEOUT))
return status; return status;
ret.cReaders = call.cReaders; 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); status = ret.ReturnCode = SCardGetStatusChangeW(hContext, call.dwTimeOut, rgReaderStates, call.cReaders);
if (status) if (status && (status != SCARD_E_TIMEOUT))
return status; return status;
ret.cReaders = call.cReaders; ret.cReaders = call.cReaders;
@ -1292,7 +1292,7 @@ void smartcard_irp_device_control(SMARTCARD_DEVICE* smartcard, IRP* irp)
break; 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, WLog_Print(smartcard->log, WLOG_WARN,
"IRP failure: %s (0x%08X), status: %s (0x%08X)", "IRP failure: %s (0x%08X), status: %s (0x%08X)",