From e4f986bb68e59e7c6797cc160fedfc2ff901615f Mon Sep 17 00:00:00 2001 From: Rudi Date: Thu, 9 May 2013 17:38:42 +0200 Subject: [PATCH] [TDA995x] avoid callback when already stopped --- .../TDA995x/TDA995xCECAdapterCommunication.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp b/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp index 936f31c..d0041d9 100644 --- a/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp +++ b/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp @@ -336,15 +336,16 @@ void *CTDA995xCECAdapterCommunication::Process(void) if (frame.service == CEC_RX_PKT) { cec_command cmd; - + cec_command::Format( cmd, initiator, destination, ( frame.size > 3 ) ? cec_opcode(frame.data[0]) : CEC_OPCODE_NONE); - + for( uint8_t i = 1; i < frame.size-3; i++ ) - cmd.parameters.PushBack(frame.data[i]); - - m_callback->OnCommandReceived(cmd); + cmd.parameters.PushBack(frame.data[i]); + + if (!IsStopped()) + m_callback->OnCommandReceived(cmd); } else if (frame.service == CEC_ACK_PKT) { -- 2.34.1