From: Lars Op den Kamp Date: Fri, 25 Nov 2011 12:09:17 +0000 (+0100) Subject: cec: fixed - routing information sets the stream path, not the physical address X-Git-Tag: upstream/2.2.0~1^2~44^2~97 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=68a12fbf647bd1552318b84173dbeb666af64c05;p=deb_libcec.git cec: fixed - routing information sets the stream path, not the physical address --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index c241ed7..a23c4e0 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -439,7 +439,7 @@ void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* if (iNewAddress > 0) { CStdString strLog; - strLog.Format(">> %s (%X): stream path changed from %04x to %04x", GetLogicalAddressName(), m_iLogicalAddress, iOldAddress, iNewAddress); + strLog.Format(">> %s (%X): stream path changed from %04x to %04x", GetLogicalAddressName(), m_iLogicalAddress, iOldAddress == 0 ? m_iStreamPath : iOldAddress, iNewAddress); AddLog(CEC_LOG_DEBUG, strLog.c_str()); m_iStreamPath = iNewAddress; diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 333b71b..d1cfdf0 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -373,7 +373,7 @@ bool CCECCommandHandler::HandleRoutingInformation(const cec_command &command) CCECBusDevice *device = GetDevice(command.initiator); if (device) { - device->SetPhysicalAddress(iNewAddress); + device->SetStreamPath(iNewAddress); return true; } }