cec: mark the active source as active and other devices as inactive. removed duplicat...
[deb_libcec.git] / src / lib / implementations / VLCommandHandler.cpp
index 89f5b2eadebc5668436040c68b841e4c4b798f0d..e3d570bf6f1e0dd51ec2965c354f4eaaec2f3738 100644 (file)
@@ -51,13 +51,11 @@ bool CVLCommandHandler::HandleSetStreamPath(const cec_command &command)
     m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
     if (streamaddr == m_busDevice->GetMyPhysicalAddress())
     {
-      CCECBusDevice *device = GetThisDevice();
-      CCECBusDevice *initiatorDevice = GetDevice(command.initiator);
-      if (device && initiatorDevice)
+      CCECBusDevice *device = GetDevice(command.destination);
+      if (device)
       {
-        return device->BroadcastActiveSource() &&
-               device->BroadcastActiveView() &&
-               initiatorDevice->ReportMenuState();
+        return device->TransmitActiveSource() &&
+               device->TransmitMenuState(command.initiator);
       }
       return false;
     }