From: Lars Op den Kamp Date: Tue, 28 Feb 2012 18:05:25 +0000 (+0100) Subject: cec: use the correct Sleep() method in CCECProcessor::OpenConnection(). the thread... X-Git-Tag: upstream/2.2.0~1^2~33^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a88017b86ccfd1f4926ec018c5392a9f9ff80be4;p=deb_libcec.git cec: use the correct Sleep() method in CCECProcessor::OpenConnection(). the thread hasn't been started there yet, so the sleep wasn't working. fixes 'device or resource busy' when plugging in the adapter. issue was reported on the forums --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index e0f8c3f..7cc01ca 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -189,7 +189,7 @@ bool CCECProcessor::OpenConnection(const char *strPort, uint16_t iBaudRate, uint { CLibCEC::AddLog(CEC_LOG_ERROR, "could not open a connection (try %d)", ++iConnectTry); m_communication->Close(); - Sleep(500); + CEvent::Sleep(1000); } if (bReturn)