{
CLockObject lock(&m_mutex);
if (m_communication->IsOpen() && m_communication->Read(msg, 50))
+ {
+ m_controller->AddLog(msg.is_error() ? CEC_LOG_WARNING : CEC_LOG_DEBUG, msg.ToString());
bParseFrame = ParseMessage(msg) && !IsStopped();
+ }
if (bParseFrame)
command = m_currentframe;
if (bParseFrame)
ParseCommand(command);
+ Sleep(5);
+
m_controller->CheckKeypressTimeout();
for (unsigned int iDevicePtr = 0; iDevicePtr < 16; iDevicePtr++)
m_busDevices[iDevicePtr]->PollVendorId();
- if (!IsStopped())
- Sleep(5);
+ Sleep(5);
}
return NULL;
CStdString strLog;
strLog.Format("received unexpected reply '%s' instead of ack", msg.MessageCodeAsString().c_str());
m_controller->AddLog(CEC_LOG_WARNING, strLog);
+ ParseMessage(msg);
bError = true;
break;
}
if (msg.empty())
return bEom;
- m_controller->AddLog(msg.is_error() ? CEC_LOG_WARNING : CEC_LOG_DEBUG, msg.ToString());
-
switch(msg.message())
{
case MSGCODE_FRAME_START: