X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=331315d77e7870f6a9e46a9058c5773dc166c5fd;hb=b057edadea84636e4e48fff043631b4bf98a9a34;hp=18f685844b20ab847fbab2fe2a0e5c9a2fada7f2;hpb=538d8471f79f8611c950ae443d9206553fb04a7a;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 18f6858..331315d 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -959,12 +959,11 @@ bool CCECCommandHandler::Transmit(cec_command &command, bool bExpectResponse /* while (!bReturn && ++iTries <= iMaxTries) { m_expectedResponse = expectedResponse; - if (m_processor->Transmit(command)) + if ((bReturn = m_processor->Transmit(command)) == true) { CLibCEC::AddLog(CEC_LOG_DEBUG, "command transmitted"); - bReturn = bExpectResponse ? - m_condition.Wait(m_receiveMutex, m_iTransmitWait) : - true; + if (bExpectResponse) + bReturn = m_condition.Wait(m_receiveMutex, m_iTransmitWait); } } --m_iUseCounter;