fix RPI POLL during LA address negotiation
authorMatus Kral <matuskral@me.com>
Tue, 15 Apr 2014 09:07:00 +0000 (11:07 +0200)
committerMatus Kral <matuskral@me.com>
Thu, 29 May 2014 01:14:52 +0000 (03:14 +0200)
src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp

index 76c61b3bb5a2fb922cf206cc7cbafd011d5c9c62..2905c56bb0d06b5e7fbb942903f52da4fa8d4d27 100644 (file)
@@ -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)