From: Lars Op den Kamp Date: Thu, 21 Jun 2012 09:16:32 +0000 (+0200) Subject: cec: get the cached power status of a device in CVLCommandHandler::PowerUpEventReceiv... X-Git-Tag: upstream/2.2.0~1^2~22^2^2~30 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=19b2a82fb3292839ce9b66e916c0c3b51332b7b4 cec: get the cached power status of a device in CVLCommandHandler::PowerUpEventReceived() instead of the current one, or it might send a CEC command to a device which is expecting a reply to another command --- diff --git a/src/lib/implementations/VLCommandHandler.cpp b/src/lib/implementations/VLCommandHandler.cpp index aadf988..642b383 100644 --- a/src/lib/implementations/VLCommandHandler.cpp +++ b/src/lib/implementations/VLCommandHandler.cpp @@ -159,14 +159,8 @@ bool CVLCommandHandler::PowerUpEventReceived(void) return true; } - cec_logical_address sourceLA = m_busDevice->GetLogicalAddress(); - if (sourceLA == CECDEVICE_TV) - sourceLA = m_processor->GetPrimaryDevice()->GetLogicalAddress(); - - cec_power_status powerStatus = m_busDevice->GetPowerStatus(sourceLA); - CLockObject lock(m_mutex); - m_bPowerUpEventReceived = (powerStatus == CEC_POWER_STATUS_ON); + m_bPowerUpEventReceived = (m_busDevice->GetCurrentPowerStatus() == CEC_POWER_STATUS_ON); return m_bPowerUpEventReceived; }