cec: set device status to 'present' when a command was received from a device
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 7 Dec 2011 17:17:46 +0000 (18:17 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 7 Dec 2011 17:17:46 +0000 (18:17 +0100)
src/lib/devices/CECBusDevice.cpp

index 1793cc4c5af3431a42b07836908f85eee7b8ec55..8b4278119746c13a710102d3906958a063696d11 100644 (file)
@@ -84,6 +84,9 @@ bool CCECBusDevice::HandleCommand(const cec_command &command)
   {
     CLockObject lock(&m_writeMutex);
     m_iLastActive = GetTimeMs();
+
+    if (m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC)
+      m_deviceStatus = CEC_DEVICE_STATUS_PRESENT;
   }
 
   /* handle the command */