diff --git a/src/channel.cpp b/src/channel.cpp index a940b564..85e03e06 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -96,10 +96,12 @@ bool CChannelSet::PutData ( const CVector& vecbyRecBuf, const int iNumBytesRead, const CHostAddress& HostAdr ) { - bool bChanOK = false; + bool bRet = false; Mutex.lock (); { + bool bChanOK = true; + /* get channel ID --------------------------------------------------- */ /* check address */ int iCurChanID = CheckAddr ( HostAdr ); @@ -116,6 +118,7 @@ bool CChannelSet::PutData ( const CVector& vecbyRecBuf, else { /* no free channel available */ + bChanOK = false; } } @@ -128,12 +131,12 @@ bool CChannelSet::PutData ( const CVector& vecbyRecBuf, { case PS_AUDIO_OK: PostWinMessage ( MS_JIT_BUF_PUT, MUL_COL_LED_GREEN, iCurChanID ); - bChanOK = true; // in case we have an audio packet, return true + bRet = true; // in case we have an audio packet, return true break; case PS_AUDIO_ERR: PostWinMessage ( MS_JIT_BUF_PUT, MUL_COL_LED_RED, iCurChanID ); - bChanOK = true; // in case we have an audio packet, return true + bRet = true; // in case we have an audio packet, return true break; case PS_PROT_ERR: @@ -144,7 +147,7 @@ bool CChannelSet::PutData ( const CVector& vecbyRecBuf, } Mutex.unlock (); - return bChanOK; + return bRet; } void CChannelSet::GetBlockAllConC ( CVector& vecChanID,