X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.cpp;h=5cfca5914c10bb890b07cf0a2a7f0cce80c69b1b;hb=8d915412796290269f7efd48dc5e6802d82f5f15;hp=7fe92a451236ec893e89ef47fd213e5ae164fb56;hpb=2f37cb68d7f3c71c38065e0e830c564a01b6caf3;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index 7fe92a4..5cfca59 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -84,7 +84,15 @@ bool CCECBusDevice::HandleCommand(const cec_command &command) m_iLastActive = GetTimeMs(); m_handler->HandleCommand(command); if (m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC) + { + if (m_deviceStatus != CEC_DEVICE_STATUS_PRESENT) + { + CStdString strLog; + strLog.Format("device %s (%x) status changed to present after command %s", GetLogicalAddressName(), (uint8_t)GetLogicalAddress(), ToString(command.opcode)); + AddLog(CEC_LOG_DEBUG, strLog); + } m_deviceStatus = CEC_DEVICE_STATUS_PRESENT; + } m_condition.Signal(); return true; } @@ -595,6 +603,8 @@ void CCECBusDevice::SetVendorId(uint64_t iVendorId) } } + m_handler->InitHandler(); + CStdString strLog; strLog.Format("%s (%X): vendor = %s (%06x)", GetLogicalAddressName(), m_iLogicalAddress, ToString(m_vendor), m_vendor); m_processor->AddLog(CEC_LOG_DEBUG, strLog.c_str()); @@ -744,6 +754,7 @@ bool CCECBusDevice::TransmitPoll(cec_logical_address dest) cec_command command; cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_NONE); + command.retries = 0; { CLockObject lock(&m_transmitMutex);