cec: removed framebuffer in CCECProcessor. any other packet is an unexpected reply
[deb_libcec.git] / src / lib / AdapterCommunication.cpp
index d3eecf45ea7f1045ef466ba38e1291f71f0186ca..0fee28b50c3a187c7d05268c162b0ba5dc0a7e32 100644 (file)
@@ -85,6 +85,7 @@ CCECAdapterMessage::CCECAdapterMessage(const cec_command &command)
 CCECAdapterMessage &CCECAdapterMessage::operator =(const CCECAdapterMessage &msg)
 {
   packet = msg.packet;
+  state  = msg.state;
   return *this;
 }
 
@@ -93,10 +94,10 @@ void CCECAdapterMessage::push_escaped(int16_t byte)
   if (byte >= MSGESC && byte != MSGSTART)
   {
     push_back(MSGESC);
-    push_back(byte - ESCOFFSET);
+    push_back((uint8_t) (byte - ESCOFFSET));
   }
   else
-    push_back(byte);
+    push_back((uint8_t) byte);
 }
 
 CAdapterCommunication::CAdapterCommunication(CLibCEC *controller) :
@@ -260,7 +261,7 @@ bool CAdapterCommunication::Read(CCECAdapterMessage &msg, uint32_t iTimeout)
     uint8_t buf = 0;
     if (!m_inBuffer.Pop(buf))
     {
-      if (!m_rcvCondition.Wait(&m_mutex, iTarget - iNow))
+      if (!m_rcvCondition.Wait(&m_mutex, (uint32_t) (iTarget - iNow)))
         return false;
     }