cec: removed 'retries' from cec_command, to avoid stack smashing when upgrading the...
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index 2fe03080c7911fb3acb4bd062fb8b9e6f203a045..5c6a52f0abc2e9d4d82ea2b1e944f8361cf5a077 100644 (file)
@@ -319,7 +319,7 @@ bool CCECCommandHandler::HandleGiveSystemAudioModeStatus(const cec_command &comm
 
 bool CCECCommandHandler::HandleImageViewOn(const cec_command &command)
 {
-  m_processor->SetActiveSource(command.initiator);
+  m_processor->SetStreamPath(m_processor->m_busDevices[command.initiator]->GetPhysicalAddress(false));
   return true;
 }
 
@@ -491,7 +491,7 @@ bool CCECCommandHandler::HandleSystemAudioModeRequest(const cec_command &command
         uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
         CCECBusDevice *newActiveDevice = GetDeviceByPhysicalAddress(iNewAddress);
         if (newActiveDevice)
-          m_processor->SetActiveSource(newActiveDevice->GetLogicalAddress());
+          m_processor->SetStreamPath(newActiveDevice->GetPhysicalAddress(false));
         return ((CCECAudioSystem *) device)->TransmitSetSystemAudioMode(command.initiator);
       }
       else
@@ -545,7 +545,7 @@ bool CCECCommandHandler::HandleSetSystemAudioMode(const cec_command &command)
 
 bool CCECCommandHandler::HandleTextViewOn(const cec_command &command)
 {
-  m_processor->SetActiveSource(command.initiator);
+  m_processor->SetStreamPath(m_processor->m_busDevices[command.initiator]->GetPhysicalAddress(false));
   return true;
 }
 
@@ -899,8 +899,6 @@ bool CCECCommandHandler::TransmitKeyRelease(const cec_logical_address iInitiator
 bool CCECCommandHandler::Transmit(cec_command &command, bool bExpectResponse /* = true */)
 {
   command.transmit_timeout = m_iTransmitTimeout;
-  if (command.retries == CEC_DEFAULT_TRANSMIT_RETRIES)
-    command.retries = m_iTransmitRetries;
 
   CLockObject writeLock(&m_processor->m_transmitMutex);
   CLockObject receiveLock(&m_receiveMutex);