fixed: only send an active source message when receiving a routing change to an addre...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 17 Oct 2013 11:14:21 +0000 (13:14 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 17 Oct 2013 11:14:21 +0000 (13:14 +0200)
src/lib/devices/CECBusDevice.cpp

index f2bd59f7b495345b7cad0fd6fbd25c03ae43a046..4358324db468a2c4e95c03f931319c02964585fd 100644 (file)
@@ -1147,14 +1147,10 @@ void CCECBusDevice::SetActiveRoute(uint16_t iRoute)
     return;
 
   CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true);
-  if (newRoute)
+  if (newRoute && newRoute->IsHandledByLibCEC())
   {
     // we were made the active source, send notification
-    if (newRoute->IsHandledByLibCEC())
-      newRoute->ActivateSource();
-    // another device was made active
-    else
-      newRoute->MarkAsActiveSource();
+    newRoute->ActivateSource();
   }
 }