X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.cpp;h=845cb07d6426af2ab801fa7ba674a439c7628517;hb=44a1d92aaca0d0428673f5479152bb1994b40f61;hp=8f679c3973f317c319afb94b9726ee2d46b0d70d;hpb=7b62b76ed9aa25bfad944140edfde33903a417bb;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index 8f679c3..845cb07 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -524,6 +524,8 @@ void CCECBusDevice::SetInactiveSource(void) { { CLockObject lock(m_mutex); + if (m_bActiveSource) + CLibCEC::AddLog(CEC_LOG_DEBUG, "marking %s (%X) as inactive source", GetLogicalAddressName(), m_iLogicalAddress); m_bActiveSource = false; } @@ -901,7 +903,10 @@ bool CCECBusDevice::TransmitPowerState(cec_logical_address dest) { CLockObject lock(m_mutex); if (!IsActiveSource()) + { + CLibCEC::AddLog(CEC_LOG_NOTICE, "power state requested of %s (%X), but we are not the active source. setting power state to standby", GetLogicalAddressName(), m_iLogicalAddress); SetPowerStatus(CEC_POWER_STATUS_STANDBY); + } CLibCEC::AddLog(CEC_LOG_NOTICE, "<< %s (%X) -> %s (%X): %s", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest, ToString(m_powerStatus)); state = m_powerStatus;