cec: fixed - directly process commands that have been received, or all the 'request...
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 17 Feb 2012 09:53:17 +0000 (10:53 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 17 Feb 2012 10:39:30 +0000 (11:39 +0100)
src/lib/CECProcessor.cpp
src/lib/CECProcessor.h

index 54162b92257f9f4e6f1fa9e6517009c46b87c4e2..afe87a979f48cdfb944291575a969f9d5009fcd7 100644 (file)
@@ -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();
     }
index 5a657533664c465c4e7e0527fc87c7d35f724c38..49c6eae904db047cff18b6d12a4d77f35094c7a4 100644 (file)
@@ -168,7 +168,6 @@ namespace CEC
       IAdapterCommunication *             m_communication;
       CLibCEC*                            m_controller;
       bool                                m_bMonitor;
-      PLATFORM::SyncedBuffer<cec_command> m_commandBuffer;
       cec_keypress                        m_previousKey;
       PLATFORM::CThread *                 m_busScan;
       uint8_t                             m_iLineTimeout;