Merge pull request #1901 from erbth/master_new

small SmartCard fix and drive redirection hotplug mechanism change
This commit is contained in:
Marc-André Moreau 2014-07-02 09:47:59 -04:00
commit 06bdc037a1
2 changed files with 8 additions and 4 deletions

View File

@ -460,6 +460,8 @@ static void* drive_hotplug_thread_func(void* arg)
tv.tv_sec = 1;
tv.tv_usec = 0;
handle_hotplug(rdpdr);
while ((rv = select(mfd+1, NULL, NULL, &rfds, &tv)) >= 0)
{
if (WaitForSingleObject(rdpdr->stopEvent, 0) == WAIT_OBJECT_0)

View File

@ -388,8 +388,9 @@ static UINT32 smartcard_GetStatusChangeA_Call(SMARTCARD_DEVICE* smartcard, SMART
status = ret.ReturnCode = SCardGetStatusChangeA(operation->hContext, call->dwTimeOut, call->rgReaderStates, call->cReaders);
if (status && (status != SCARD_E_TIMEOUT) && (status != SCARD_E_CANCELLED))
return status;
if (status && (status != SCARD_E_TIMEOUT) && (status != SCARD_E_CANCELLED)){
call->cReaders=0;
}
ret.cReaders = call->cReaders;
ret.rgReaderStates = (ReaderState_Return*) calloc(ret.cReaders, sizeof(ReaderState_Return));
@ -453,8 +454,9 @@ static UINT32 smartcard_GetStatusChangeW_Call(SMARTCARD_DEVICE* smartcard, SMART
status = ret.ReturnCode = SCardGetStatusChangeW(operation->hContext, call->dwTimeOut, call->rgReaderStates, call->cReaders);
if (status && (status != SCARD_E_TIMEOUT) && (status != SCARD_E_CANCELLED))
return status;
if (status && (status != SCARD_E_TIMEOUT) && (status != SCARD_E_CANCELLED)){
call->cReaders=0;
}
ret.cReaders = call->cReaders;
ret.rgReaderStates = (ReaderState_Return*) calloc(ret.cReaders, sizeof(ReaderState_Return));