From 5eb9e3af7e3ef69a7acb98d32b6275156a6ff8b0 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Sun, 30 Oct 2011 15:28:39 +0100 Subject: [PATCH] cec: don't set the physical address to 0 --- src/lib/devices/CECBusDevice.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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) -- 2.34.1