From cb339764257f121993a9b7fa8211027e0a0544b1 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Tue, 4 Dec 2012 01:05:35 +0100 Subject: [PATCH] check unsupported features properly --- src/lib/implementations/CECCommandHandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- 2.34.1