From: Matus Kral Date: Tue, 15 Apr 2014 09:07:00 +0000 (+0200) Subject: fix RPI POLL during LA address negotiation X-Git-Tag: upstream/2.2.0~1^2~1^2~3^2~11^2~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=38b8eaae3ef151943595c4033b628a7c98d90c64;p=deb_libcec.git fix RPI POLL during LA address negotiation --- diff --git a/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp b/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp index 76c61b3..2905c56 100644 --- a/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp +++ b/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp @@ -382,13 +382,18 @@ cec_adapter_message_state CRPiCECAdapterCommunication::Write(const cec_command & return (data.initiator == data.destination) ? ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED : ADAPTER_MESSAGE_STATE_ERROR; } - if (!data.opcode_set && data.initiator == data.destination) + if (!m_queue->Write(data, bIsReply)) { - // registration of the logical address would have failed - return ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED; + if (!data.opcode_set) + { + return ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED; + } + + return ADAPTER_MESSAGE_STATE_SENT; } - return m_queue->Write(data, bIsReply) ? ADAPTER_MESSAGE_STATE_SENT_ACKED : ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED; + return ADAPTER_MESSAGE_STATE_SENT_ACKED; + } uint16_t CRPiCECAdapterCommunication::GetFirmwareVersion(void)