From: Lars Op den Kamp Date: Sun, 30 Oct 2011 10:31:29 +0000 (+0100) Subject: cec: fixed - wait for ack while keeping a lock X-Git-Tag: upstream/2.2.0~1^2~173 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cd505625984870e36f98323209d3c2d7273e3266;p=deb_libcec.git cec: fixed - wait for ack while keeping a lock --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 277009b..3fb3bc2 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -223,17 +223,17 @@ bool CCECProcessor::Transmit(const cec_command &data) return bReturn; } } - } - if (data.ack_timeout > 0) - { - bool bError(false); - if ((bReturn = WaitForAck(&bError, output->size(), data.ack_timeout)) == false) - m_controller->AddLog(CEC_LOG_ERROR, "did not receive ack"); - } - else - { - bReturn = true; + if (data.ack_timeout > 0) + { + bool bError(false); + if ((bReturn = WaitForAck(&bError, output->size(), data.ack_timeout)) == false) + m_controller->AddLog(CEC_LOG_ERROR, "did not receive ack"); + } + else + { + bReturn = true; + } } return bReturn;