From cf543eab7c4e27fe88c2dbbd865bbbbf3dc37868 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 14 Jun 2020 21:00:19 +0200 Subject: [PATCH] merge fixes --- src/protocol.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/protocol.cpp b/src/protocol.cpp index c7810902..3cc6dab6 100755 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -1565,7 +1565,7 @@ void CProtocol::CreateRecorderStateMes ( const ERecorderState eRecorderState ) int iPos = 0; // init position pointer // build data vector - // recorder state + // server jam recorder state (1 byte) PutValOnStream ( vecData, iPos, static_cast ( eRecorderState ), 1 ); CreateAndSendMessage ( PROTMESSID_RECORDER_STATE, vecData ); @@ -1581,11 +1581,17 @@ bool CProtocol::EvaluateRecorderStateMes(const CVector& vecData) return true; // return error code } - // server jam recorder state - const ERecorderState eRecorderState = static_cast ( GetValFromStream ( vecData, iPos, 1 ) ); + // server jam recorder state (1 byte) + const int iRecorderState = + static_cast ( GetValFromStream ( vecData, iPos, 1 ) ); + + if ( iRecorderState != RS_UNDEFINED ) // ... to be defined ... + { + return true; + } // invoke message action - emit RecorderStateReceived ( eRecorderState ); + emit RecorderStateReceived ( static_cast ( iRecorderState ) ); return false; // no error }