From: Lars Op den Kamp Date: Sun, 30 Oct 2011 14:28:39 +0000 (+0100) Subject: cec: don't set the physical address to 0 X-Git-Tag: upstream/2.2.0~1^2~167 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5eb9e3af7e3ef69a7acb98d32b6275156a6ff8b0;p=deb_libcec.git cec: don't set the physical address to 0 --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index c798ded..dc9e620 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -216,11 +216,14 @@ void CCECBusDevice::PollVendorId(void) void CCECBusDevice::SetPhysicalAddress(uint16_t iNewAddress, uint16_t iOldAddress /* = 0 */) { - CStdString strLog; - strLog.Format(">> %i changed physical address from %04x to %04x", GetLogicalAddress(), m_iPhysicalAddress, iNewAddress); - AddLog(CEC_LOG_DEBUG, strLog.c_str()); + if (iNewAddress > 0) + { + CStdString strLog; + strLog.Format(">> %i changed physical address from %04x to %04x", GetLogicalAddress(), m_iPhysicalAddress, iNewAddress); + AddLog(CEC_LOG_DEBUG, strLog.c_str()); - m_iPhysicalAddress = iNewAddress; + m_iPhysicalAddress = iNewAddress; + } } bool CCECBusDevice::PowerOn(void)