cec: fixed - routing information sets the stream path, not the physical address
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 25 Nov 2011 12:09:17 +0000 (13:09 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 25 Nov 2011 12:09:17 +0000 (13:09 +0100)
src/lib/devices/CECBusDevice.cpp
src/lib/implementations/CECCommandHandler.cpp

index c241ed766aca4aafe94db80e6ce7fa4151762ca0..a23c4e07187c80620fbf5f5791697b5730876a8b 100644 (file)
@@ -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;
index 333b71b1ab12817d6927ff1ffbc4eae252717fd2..d1cfdf005f75f4c3c2fb11a8e2ce7617918280a4 100644 (file)
@@ -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;
     }
   }