From: Lars Op den Kamp Date: Thu, 29 Mar 2012 09:54:06 +0000 (+0200) Subject: cec: use a 5ms read timeout in CUSBCECAdapterCommunication X-Git-Tag: upstream/2.2.0~1^2~31^2~35 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4901b94dd93b4783fcccfd071b375aafa8ed1480;p=deb_libcec.git cec: use a 5ms read timeout in CUSBCECAdapterCommunication --- diff --git a/src/lib/adapter/USBCECAdapterCommunication.cpp b/src/lib/adapter/USBCECAdapterCommunication.cpp index c1645d0..8269d13 100644 --- a/src/lib/adapter/USBCECAdapterCommunication.cpp +++ b/src/lib/adapter/USBCECAdapterCommunication.cpp @@ -224,7 +224,7 @@ void *CUSBCECAdapterCommunication::Process(void) { { CLockObject lock(m_mutex); - ReadFromDevice(50); + ReadFromDevice(5); bCommandReceived = m_callback && Read(command, 0) && m_bInitialised; } @@ -1026,7 +1026,6 @@ cec_datapacket CUSBCECAdapterCommunication::GetSetting(cec_adapter_messagecode m return retVal; } - Sleep(250); // TODO ReadFromDevice() isn't waiting for the timeout to pass on win32 ReadFromDevice(CEC_DEFAULT_TRANSMIT_WAIT, iResponseLength + 3 /* start + msgcode + iResponseLength + end */); CCECAdapterMessage input; if (Read(input, 0))