server list/client list connection less message seems to need a mutex at the server
This commit is contained in:
parent
3872206f29
commit
0f9b422d0f
3 changed files with 11 additions and 9 deletions
|
@ -24,8 +24,6 @@
|
||||||
- bug fix: grouping faders in the client should be proportional (see discussion in #202, #419)
|
- bug fix: grouping faders in the client should be proportional (see discussion in #202, #419)
|
||||||
|
|
||||||
|
|
||||||
TODO server list/client list connection less message seems to need a mutex at the server
|
|
||||||
|
|
||||||
TODO improve settings management -> move settings class in client/server classes, move actual settings variables
|
TODO improve settings management -> move settings class in client/server classes, move actual settings variables
|
||||||
TODO improve interaction between use of inifile and command line parameters (edited) #120
|
TODO improve interaction between use of inifile and command line parameters (edited) #120
|
||||||
TODO Save and restore mixer state (fader / mute / solo...) #377
|
TODO Save and restore mixer state (fader / mute / solo...) #377
|
||||||
|
|
|
@ -630,14 +630,16 @@ void CServer::OnNewConnection ( int iChID,
|
||||||
|
|
||||||
// send welcome message (if enabled)
|
// send welcome message (if enabled)
|
||||||
MutexWelcomeMessage.lock();
|
MutexWelcomeMessage.lock();
|
||||||
if ( !strWelcomeMessage.isEmpty() )
|
|
||||||
{
|
{
|
||||||
// create formatted server welcome message and send it just to
|
if ( !strWelcomeMessage.isEmpty() )
|
||||||
// the client which just connected to the server
|
{
|
||||||
const QString strWelcomeMessageFormated =
|
// create formatted server welcome message and send it just to
|
||||||
"<b>Server Welcome Message:</b> " + strWelcomeMessage;
|
// the client which just connected to the server
|
||||||
|
const QString strWelcomeMessageFormated =
|
||||||
|
"<b>Server Welcome Message:</b> " + strWelcomeMessage;
|
||||||
|
|
||||||
vecChannels[iChID].CreateChatTextMes ( strWelcomeMessageFormated );
|
vecChannels[iChID].CreateChatTextMes ( strWelcomeMessageFormated );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MutexWelcomeMessage.unlock();
|
MutexWelcomeMessage.unlock();
|
||||||
|
|
||||||
|
|
|
@ -456,8 +456,10 @@ public slots:
|
||||||
void OnCLReqVersionAndOS ( CHostAddress InetAddr )
|
void OnCLReqVersionAndOS ( CHostAddress InetAddr )
|
||||||
{ ConnLessProtocol.CreateCLVersionAndOSMes ( InetAddr ); }
|
{ ConnLessProtocol.CreateCLVersionAndOSMes ( InetAddr ); }
|
||||||
|
|
||||||
|
// the CreateChannelList() function access vecChannels which as to be mutexed
|
||||||
|
// since the normal server thread my change that at a random time
|
||||||
void OnCLReqConnClientsList ( CHostAddress InetAddr )
|
void OnCLReqConnClientsList ( CHostAddress InetAddr )
|
||||||
{ ConnLessProtocol.CreateCLConnClientsListMes ( InetAddr, CreateChannelList() ); }
|
{ QMutexLocker locker ( &Mutex ); ConnLessProtocol.CreateCLConnClientsListMes ( InetAddr, CreateChannelList() ); }
|
||||||
|
|
||||||
void OnCLRegisterServerReceived ( CHostAddress InetAddr,
|
void OnCLRegisterServerReceived ( CHostAddress InetAddr,
|
||||||
CHostAddress LInetAddr,
|
CHostAddress LInetAddr,
|
||||||
|
|
Loading…
Reference in a new issue