From: Lars Op den Kamp Date: Thu, 16 Feb 2012 09:57:26 +0000 (+0100) Subject: cec: check whether the port is open, not whether libCEC is initialised in Transmit() X-Git-Tag: upstream/2.2.0~1^2~35^2~25 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=44195125b9e12fafbba24ea0ae52795b7171703f;p=deb_libcec.git cec: check whether the port is open, not whether libCEC is initialised in Transmit() --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index f9d2134..643defa 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -869,7 +869,7 @@ bool CCECProcessor::Transmit(const cec_command &data) CLockObject lock(m_mutex); LogOutput(data); m_iLastTransmission = GetTimeMs(); - if (!m_communication || !IsInitialised()) + if (!m_communication || !m_communication->IsOpen()) { CLibCEC::AddLog(CEC_LOG_ERROR, "cannot transmit command: connection closed"); return false;