From: Mark Kendall Date: Mon, 2 Apr 2012 16:12:51 +0000 (+0100) Subject: CEC Configuration: Only update the physical address when it has actually X-Git-Tag: upstream/2.2.0~1^2~31^2~21 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2270ce69c7ecb1914caf617f9a9cfa2222244741;p=deb_libcec.git CEC Configuration: Only update the physical address when it has actually changed. bugzid: 672 --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 20ae10a..59a537f 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -1556,9 +1556,12 @@ bool CCECProcessor::SetConfiguration(const libcec_configuration *configuration) { if (configuration->iPhysicalAddress != 0) bPhysicalAddressChanged = IsRunning() && m_configuration.iPhysicalAddress != configuration->iPhysicalAddress; - if (IsRunning()) - CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - using physical address '%4x'", __FUNCTION__, configuration->iPhysicalAddress); - m_configuration.iPhysicalAddress = configuration->iPhysicalAddress; + if (bPhysicalAddressChanged) + { + if (IsRunning()) + CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - using physical address '%4x'", __FUNCTION__, configuration->iPhysicalAddress); + m_configuration.iPhysicalAddress = configuration->iPhysicalAddress; + } } bool bHdmiPortChanged(false);