bug fix in server: disconnect message lead to problem with server status and logging

This commit is contained in:
Volker Fischer 2009-10-10 08:53:48 +00:00
parent 559945c424
commit 5df18595d2

View File

@ -621,13 +621,11 @@ bool CServer::PutData ( const CVector<uint8_t>& vecbyRecBuf,
const int iNumBytesRead, const int iNumBytesRead,
const CHostAddress& HostAdr ) const CHostAddress& HostAdr )
{ {
bool bAudioOK = false; bool bChanOK = true; // init with ok, might be overwritten
bool bNewChannelReserved = false; bool bNewChannelReserved = false;
Mutex.lock(); Mutex.lock();
{ {
bool bChanOK = true;
// Get channel ID ------------------------------------------------------ // Get channel ID ------------------------------------------------------
// check address // check address
int iCurChanID = CheckAddr ( HostAdr ); int iCurChanID = CheckAddr ( HostAdr );
@ -681,12 +679,10 @@ bool CServer::PutData ( const CVector<uint8_t>& vecbyRecBuf,
{ {
case PS_AUDIO_OK: case PS_AUDIO_OK:
PostWinMessage ( MS_JIT_BUF_PUT, MUL_COL_LED_GREEN, iCurChanID ); PostWinMessage ( MS_JIT_BUF_PUT, MUL_COL_LED_GREEN, iCurChanID );
bAudioOK = true; // in case we have an audio packet, return true
break; break;
case PS_AUDIO_ERR: case PS_AUDIO_ERR:
PostWinMessage ( MS_JIT_BUF_PUT, MUL_COL_LED_RED, iCurChanID ); PostWinMessage ( MS_JIT_BUF_PUT, MUL_COL_LED_RED, iCurChanID );
bAudioOK = true; // in case we have an audio packet, return true
break; break;
case PS_PROT_ERR: case PS_PROT_ERR:
@ -729,7 +725,7 @@ CreateAndSendChanListForAllConChannels();
} }
Mutex.unlock(); Mutex.unlock();
return bAudioOK; return bChanOK;
} }
void CServer::GetConCliParam ( CVector<CHostAddress>& vecHostAddresses, void CServer::GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,