From c19794c7ced875151df0a44c249ab00a31e5af26 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 26 Feb 2006 12:18:37 +0000 Subject: [PATCH] bug fix --- src/protocol.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/protocol.cpp b/src/protocol.cpp index c76c3ba5..7e90df2e 100755 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -97,10 +97,6 @@ bool CProtocol::ParseMessage ( const CVector& vecbyData, CVector vecData; -// TEST -qDebug ( "parser entered" ); - - // convert unsigned char in uint8_t, TODO convert all buffers in uint8_t CVector vecbyDataConv ( iNumBytes ); for ( int i = 0; i < iNumBytes; i++ ) { @@ -178,11 +174,6 @@ bool CProtocol::ParseMessageFrame ( const CVector& vecIn, } -// TEST -qDebug ( "min length ok" ); - - - // decode header ----- iCurPos = 0; // start from beginning @@ -196,20 +187,11 @@ qDebug ( "min length ok" ); iLenBy = static_cast ( GetValFromStream ( vecIn, iCurPos, 2 ) ); // make sure the length is correct - - -qDebug ( "iLenBy: %d / iVecInLenByte: %d" ); - - if ( iLenBy != iVecInLenByte - MESS_LEN_WITHOUT_DATA_BYTE ) { return false; // return error code } -// TEST -qDebug ( "overall length ok" ); - - // now check CRC ----- CCRC CRCObj; @@ -228,11 +210,8 @@ qDebug ( "overall length ok" ); } -// TEST -qDebug ( "CRC ok" ); - - // decode data ----- + vecData.Init ( iLenBy ); iCurPos = MESS_HEADER_LENGTH_BYTE; // start from beginning of data for ( i = 0; i < iLenBy; i++ ) {