transmit an abort message when the vendor id is requested for philips, instead of...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 15 Nov 2012 14:15:52 +0000 (15:15 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 15 Nov 2012 14:18:24 +0000 (15:18 +0100)
src/lib/devices/CECBusDevice.cpp
src/lib/implementations/CECCommandHandler.cpp
src/lib/implementations/CECCommandHandler.h
src/lib/implementations/PHCommandHandler.cpp
src/lib/implementations/PHCommandHandler.h
src/lib/implementations/SLCommandHandler.cpp

index b7b08c71e5e16922bd74af9ba8043f2dbb162bb8..6703e87ccd3d0be9c1b3e1cbd84552c7f4037b12 100644 (file)
@@ -748,7 +748,7 @@ bool CCECBusDevice::TransmitVendorID(const cec_logical_address destination, bool
   else
   {
     LIB_CEC->AddLog(CEC_LOG_DEBUG, "<< %s (%X) -> %s (%X): vendor id %s (%x)", GetLogicalAddressName(), m_iLogicalAddress, ToString(destination), destination, ToString((cec_vendor_id)iVendorId), iVendorId);
-    bReturn = m_handler->TransmitVendorID(m_iLogicalAddress, iVendorId, bIsReply);
+    bReturn = m_handler->TransmitVendorID(m_iLogicalAddress, destination, iVendorId, bIsReply);
   }
   MarkReady();
   return bReturn;
index 27e692e997ff70b70581f9698ea8b4eabdedb47e..7031f094f81fc2dc2379bfd347de5e0ab9a3948c 100644 (file)
@@ -1034,7 +1034,7 @@ bool CCECCommandHandler::TransmitPowerState(const cec_logical_address iInitiator
   return Transmit(command, false, bIsReply);
 }
 
-bool CCECCommandHandler::TransmitVendorID(const cec_logical_address iInitiator, uint64_t iVendorId, bool bIsReply)
+bool CCECCommandHandler::TransmitVendorID(const cec_logical_address iInitiator, const cec_logical_address UNUSED(iDestination), uint64_t iVendorId, bool bIsReply)
 {
   cec_command command;
   cec_command::Format(command, iInitiator, CECDEVICE_BROADCAST, CEC_OPCODE_DEVICE_VENDOR_ID);
index 7ea5485f9d13b5c03eb3061fe46e2f1d24bfec9c..61e7f22c19e933ccb93911f528350f2ee77319cd 100644 (file)
@@ -83,7 +83,7 @@ namespace CEC
     virtual bool TransmitSetMenuLanguage(const cec_logical_address iInitiator, const char lang[3], bool bIsReply);
     virtual bool TransmitPoll(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bIsReply);
     virtual bool TransmitPowerState(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_power_status state, bool bIsReply);
-    virtual bool TransmitVendorID(const cec_logical_address iInitiator, uint64_t iVendorId, bool bIsReply);
+    virtual bool TransmitVendorID(const cec_logical_address iInitiator, const cec_logical_address iDestination, uint64_t iVendorId, bool bIsReply);
     virtual bool TransmitAudioStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, uint8_t state, bool bIsReply);
     virtual bool TransmitSetSystemAudioMode(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_system_audio_status state, bool bIsReply);
     virtual bool TransmitSystemAudioModeStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_system_audio_status state, bool bIsReply);
index a4e7129d44b22780b3523c19abb8978cd4ab8eb9..b46f69e06bfb53cf80727744eff943ca61209f93 100644 (file)
@@ -151,9 +151,9 @@ int CPHCommandHandler::HandleDeviceVendorId(const cec_command& command)
   return CCECCommandHandler::HandleDeviceVendorId(command);
 }
 
-int CPHCommandHandler::HandleGiveDeviceVendorId(const cec_command& command)
+bool CPHCommandHandler::TransmitVendorID(const cec_logical_address iInitiator, const cec_logical_address iDestination, uint64_t UNUSED(iVendorId), bool UNUSED(bIsReply))
 {
-  LIB_CEC->AddLog(CEC_LOG_DEBUG, "<< %s (%X) -> %s (%X): vendor id feature abort", ToString(command.destination), command.destination, ToString(command.initiator), command.initiator);
-  m_processor->TransmitAbort(command.destination, command.initiator, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID);
-  return COMMAND_HANDLED;
+  LIB_CEC->AddLog(CEC_LOG_DEBUG, "<< %s (%X) -> %s (%X): vendor id feature abort", ToString(iInitiator), iInitiator, ToString(iDestination), iDestination);
+  m_processor->TransmitAbort(iInitiator, iDestination, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID);
+  return true;
 }
index 8118d82716cdad3e31550267800797995eee828b..d1788c0af57b429b02e0c664e03d01fb91b8e199 100644 (file)
@@ -69,7 +69,7 @@ namespace CEC
     virtual bool ActivateSource(bool bTransmitDelayedCommandsOnly = false);
     virtual int HandleUserControlPressed(const cec_command& command);
     virtual int HandleUserControlRelease(const cec_command& command);
-    virtual int HandleGiveDeviceVendorId(const cec_command& command);
+    virtual bool TransmitVendorID(const cec_logical_address iInitiator, const cec_logical_address iDestination, uint64_t iVendorId, bool bIsReply);
     virtual int HandleDeviceVendorId(const cec_command& command);
     uint8_t            m_iLastKeyCode;
     CImageViewOnCheck* m_imageViewOnCheck;
index 4671037b5573902e5a89c2bf78650154bd436534..e686fdd800edf383416522563eab4ab0b06f7b58 100644 (file)
@@ -403,7 +403,7 @@ bool CSLCommandHandler::PowerOn(const cec_logical_address iInitiator, const cec_
     cec_command command;
 
     if (!m_bSLEnabled)
-      TransmitVendorID(CECDEVICE_TV, CEC_VENDOR_LG, false);
+      TransmitVendorID(CECDEVICE_TV, iDestination, CEC_VENDOR_LG, false);
 
     cec_command::Format(command, CECDEVICE_TV, iDestination, CEC_OPCODE_VENDOR_COMMAND);
     command.PushBack(SL_COMMAND_POWER_ON);