From: Lars Op den Kamp Date: Tue, 4 Dec 2012 00:05:35 +0000 (+0100) Subject: check unsupported features properly X-Git-Tag: upstream/2.2.0~1^2~9^2~1^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cb339764257f121993a9b7fa8211027e0a0544b1;p=deb_libcec.git check unsupported features properly --- diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index a498315..ed5e741 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -1142,11 +1142,15 @@ bool CCECCommandHandler::Transmit(cec_command &command, bool bSuppressWait, bool LIB_CEC->AddLog(CEC_LOG_DEBUG, "not sending command '%s': destination device '%s' marked as handled by libCEC", ToString(command.opcode),ToString(command.destination)); return bReturn; } + else if (destinationDevice->IsUnsupportedFeature(command.opcode)) + { + return true; + } } { uint8_t iTries(0), iMaxTries(!command.opcode_set ? 1 : m_iTransmitRetries + 1); - while (!bReturn && ++iTries <= iMaxTries && !m_busDevice->IsUnsupportedFeature(command.opcode)) + while (!bReturn && ++iTries <= iMaxTries) { if ((bReturn = m_processor->Transmit(command, bIsReply)) == true) {