From: Lars Op den Kamp Date: Thu, 11 Oct 2012 12:34:43 +0000 (+0200) Subject: fixed - log all device status changes X-Git-Tag: upstream/2.2.0~1^2~15^2^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=05dac05dd579ab0bf852ef2acfc44049009d087b;p=deb_libcec.git fixed - log all device status changes --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index e3d4cfd..688cb12 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -174,11 +174,6 @@ bool CCECBusDevice::HandleCommand(const cec_command &command) { CLockObject lock(m_mutex); m_iLastActive = GetTimeMs(); - - /* don't call GetStatus() here, just read the value with the mutex locked */ - if (m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC && command.opcode_set == 1) - m_deviceStatus = CEC_DEVICE_STATUS_PRESENT; - MarkBusy(); } @@ -841,10 +836,10 @@ bool CCECBusDevice::TransmitPoll(const cec_logical_address dest, bool bIsReply) if (bReturn) { m_iLastActive = GetTimeMs(); - destDevice->m_deviceStatus = CEC_DEVICE_STATUS_PRESENT; + SetDeviceStatus(CEC_DEVICE_STATUS_PRESENT); } else - destDevice->m_deviceStatus = CEC_DEVICE_STATUS_NOT_PRESENT; + SetDeviceStatus(CEC_DEVICE_STATUS_NOT_PRESENT); MarkReady(); return bReturn;