From: Lars Op den Kamp Date: Mon, 14 May 2012 20:06:33 +0000 (+0200) Subject: replaced 2 more occurences of Close() by m_port->Close() X-Git-Tag: upstream/2.2.0~1^2~28^2~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=65108638b4d86198e03bc709a8a51a4658aef160;p=deb_libcec.git replaced 2 more occurences of Close() by m_port->Close() --- diff --git a/src/lib/adapter/USBCECAdapterCommunication.cpp b/src/lib/adapter/USBCECAdapterCommunication.cpp index 70eddb8..801ebc5 100644 --- a/src/lib/adapter/USBCECAdapterCommunication.cpp +++ b/src/lib/adapter/USBCECAdapterCommunication.cpp @@ -341,7 +341,8 @@ bool CUSBCECAdapterCommunication::WriteToDevice(CCECAdapterMessage *message) { LIB_CEC->AddLog(CEC_LOG_DEBUG, "error writing command '%s' to serial port '%s': %s", CCECAdapterMessage::ToString(message->Message()), m_port->GetName().c_str(), m_port->GetError().c_str()); message->state = ADAPTER_MESSAGE_STATE_ERROR; - Close(); + // this will trigger an alert in the reader thread + m_port->Close(); return false; } @@ -486,7 +487,7 @@ bool CUSBCECAdapterCommunication::StartBootloader(void) { if (m_port->IsOpen() && m_commands->StartBootloader()) { - Close(); + m_port->Close(); return true; } return false;