cec: added logical address autodetection and let libcec handle multiple types simulta...
[deb_libcec.git] / src / lib / implementations / VLCommandHandler.cpp
index 89f5b2eadebc5668436040c68b841e4c4b798f0d..0104e9a240e86baa26799e96ee95f16ac04e3bd9 100644 (file)
@@ -51,13 +51,12 @@ 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();
+               device->ReportMenuState(command.initiator);
       }
       return false;
     }