diff --git a/src/protocol.cpp b/src/protocol.cpp index b59b4a1e..d0a3fc5e 100755 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -335,6 +335,19 @@ bool CProtocol::ParseMessage ( const CVector& vecbyData, if ( rand() < ( RAND_MAX / 2 ) ) return false; */ + // in case this is a connection less message, we do not process it here + if ( IsConnectionLessMessageID ( iRecID ) ) + { + + +// TODO fire signal so that an other class can process this type of message + + + // return function without issuing an error code (since it is a + // regular message but will just not processed here) + return false; + } + // In case we received a message and returned an answer but our answer // did not make it to the receiver, he will resend his message. We check // here if the message is the same as the old one, and if this is the diff --git a/src/protocol.h b/src/protocol.h index 560572e8..72638333 100755 --- a/src/protocol.h +++ b/src/protocol.h @@ -54,7 +54,7 @@ #define PROTMESSID_REQ_CHANNEL_NAME 23 // request channel name for fader tag // message IDs of connection less messages (CLM) -// DEFINITION -> start at 1000, end at 1999 +// DEFINITION -> start at 1000, end at 1999, see IsConnectionLessMessageID #define PROTMESSID_CLM_PING_MS 1001 // for measuring ping time #define PROTMESSID_CLM_SERVER_FULL 1002 // server full message #define PROTMESSID_CLM_SERVER_LIST 1003 // server list @@ -153,6 +153,9 @@ protected: unsigned int& iPos, const unsigned int iNumOfBytes ); + bool IsConnectionLessMessageID ( const int iID ) const + { return (iID >= 1000) & (iID < 2000); } + void SendMessage(); void CreateAndSendMessage ( const int iID, const CVector& vecData );