From: Lars Op den Kamp Date: Fri, 17 Feb 2012 09:53:17 +0000 (+0100) Subject: cec: fixed - directly process commands that have been received, or all the 'request... X-Git-Tag: upstream/2.2.0~1^2~35^2~17 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=f6b94ad2fcaf7b7e09734b32c885d507cc30e45d cec: fixed - directly process commands that have been received, or all the 'request' methods will fail initially --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 54162b9..afe87a9 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -432,13 +432,12 @@ void CCECProcessor::ReplaceHandlers(void) bool CCECProcessor::OnCommandReceived(const cec_command &command) { - m_commandBuffer.Push(command); + ParseCommand(command); return true; } void *CCECProcessor::Process(void) { - cec_command command; CLibCEC::AddLog(CEC_LOG_DEBUG, "processor thread started"); while (!IsStopped() && m_communication->IsOpen()) @@ -446,8 +445,6 @@ void *CCECProcessor::Process(void) if (IsInitialised()) { ReplaceHandlers(); - if (m_commandBuffer.Pop(command)) - ParseCommand(command); m_controller->CheckKeypressTimeout(); } diff --git a/src/lib/CECProcessor.h b/src/lib/CECProcessor.h index 5a65753..49c6eae 100644 --- a/src/lib/CECProcessor.h +++ b/src/lib/CECProcessor.h @@ -168,7 +168,6 @@ namespace CEC IAdapterCommunication * m_communication; CLibCEC* m_controller; bool m_bMonitor; - PLATFORM::SyncedBuffer m_commandBuffer; cec_keypress m_previousKey; PLATFORM::CThread * m_busScan; uint8_t m_iLineTimeout;