clean up -> COMPATIBILITY ISSUE can be safely removed, ResetTimeOutCounter is not necessary since it is already done in the channel

This commit is contained in:
Volker Fischer 2020-05-26 15:43:00 +02:00
parent 2e03e387e4
commit 726cc6facf

View File

@ -565,17 +565,12 @@ void CServer::OnNewConnection ( int iChID,
// client or server thinks that the connection was still active, etc.) // client or server thinks that the connection was still active, etc.)
vecChannels[iChID].CreateReqJitBufMes(); vecChannels[iChID].CreateReqJitBufMes();
// logging of new connected channel
Logging.AddNewConnection ( RecHostAddr.InetAddr );
// A new client connected to the server, the channel list // A new client connected to the server, the channel list
// at all clients have to be updated. This is done by sending // at all clients have to be updated. This is done by sending
// a channel name request to the client which causes a channel // a channel name request to the client which causes a channel
// name message to be transmitted to the server. If the server // name message to be transmitted to the server. If the server
// receives this message, the channel list will be automatically // receives this message, the channel list will be automatically
// updated (implicitely). // updated (implicitely).
// To make sure the protocol message is transmitted, the channel
// first has to be marked as connected.
// //
// Usually it is not required to send the channel list to the // Usually it is not required to send the channel list to the
// client currently connecting since it automatically requests // client currently connecting since it automatically requests
@ -585,14 +580,8 @@ void CServer::OnNewConnection ( int iChID,
// in case the client thinks he is still connected but the server // in case the client thinks he is still connected but the server
// was restartet, it is important that we send the channel list // was restartet, it is important that we send the channel list
// at this place. // at this place.
vecChannels[iChID].ResetTimeOutCounter();
vecChannels[iChID].CreateReqChanInfoMes(); vecChannels[iChID].CreateReqChanInfoMes();
// COMPATIBILITY ISSUE
// since old versions of the software did not implement the channel name
// request message, we have to explicitely send the channel list here
CreateAndSendChanListForAllConChannels();
// send welcome message (if enabled) // send welcome message (if enabled)
if ( !strWelcomeMessage.isEmpty() ) if ( !strWelcomeMessage.isEmpty() )
{ {
@ -616,6 +605,9 @@ CreateAndSendChanListForAllConChannels();
// reset the conversion buffers // reset the conversion buffers
DoubleFrameSizeConvBufIn[iChID].Reset(); DoubleFrameSizeConvBufIn[iChID].Reset();
DoubleFrameSizeConvBufOut[iChID].Reset(); DoubleFrameSizeConvBufOut[iChID].Reset();
// logging of new connected channel
Logging.AddNewConnection ( RecHostAddr.InetAddr );
} }
void CServer::OnServerFull ( CHostAddress RecHostAddr ) void CServer::OnServerFull ( CHostAddress RecHostAddr )