cec: always wait for thread exit in CThread's desctructor
[deb_libcec.git] / src / lib / CECProcessor.cpp
index a4218406f620013555cb63ee1b0d93bdfbb55907..83e9ee8c40451211dc0a79f75cdfb403142a6284 100644 (file)
@@ -912,7 +912,9 @@ void CCECProcessor::TransmitAbort(cec_logical_address address, cec_opcode opcode
 void CCECProcessor::ParseCommand(const cec_command &command)
 {
   CStdString dataStr;
-  dataStr.Format(">> %1x%1x:%02x", command.initiator, command.destination, command.opcode);
+  dataStr.Format(">> %1x%1x", command.initiator, command.destination);
+  if (command.opcode_set == 1)
+    dataStr.AppendFormat(":%02x", command.opcode);
   for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++)
     dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]);
   CLibCEC::AddLog(CEC_LOG_TRAFFIC, dataStr.c_str());
@@ -1479,7 +1481,7 @@ bool CCECProcessor::PingAdapter(void)
 
 void CCECProcessor::HandlePoll(cec_logical_address initiator, cec_logical_address destination)
 {
-  m_busDevices[initiator]->HandlePoll(destination);
+  m_busDevices[destination]->HandlePoll(initiator);
 }
 
 bool CCECProcessor::HandleReceiveFailed(cec_logical_address initiator)