cec: don't unlock the transmit mutex in CCECProcessor while waiting for an answer
[deb_libcec.git] / src / lib / implementations / SLCommandHandler.cpp
index 4a9d19e3c5640e8b17edb474d81c6ebd767e8cb1..6e4b92f866874f3913acf285ee7365c9dbd943e2 100644 (file)
@@ -75,7 +75,7 @@ bool CSLCommandHandler::HandleVendorCommand(const cec_command &command)
     cec_command response;
     cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_VENDOR_COMMAND, m_iTransmitTimeout);
     response.PushBack(SL_COMMAND_CONNECT_ACCEPT);
-    response.PushBack(m_busDevice->GetProcessor()->GetLogicalAddresses().primary);
+    response.PushBack((uint8_t)m_busDevice->GetProcessor()->GetLogicalAddresses().primary);
     Transmit(response);
 
     /* set deck status for the playback device */
@@ -231,6 +231,7 @@ bool CSLCommandHandler::InitHandler(void)
 
   if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)
   {
+    m_busDevice->GetProcessor()->SetActiveSource(m_busDevice->GetProcessor()->GetLogicalAddresses().primary);
     /* LG TVs only route keypresses when the deck status is set to 0x20 */
     cec_logical_addresses addr = m_busDevice->GetProcessor()->GetLogicalAddresses();
     for (uint8_t iPtr = 0; iPtr < 15; iPtr++)