From 1494de7b05674d0b8815e9950e69b4486f7b43a8 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Thu, 30 Apr 2020 19:26:04 +0200 Subject: [PATCH] small merge fixes --- ChangeLog | 4 ++-- src/serverlist.cpp | 17 +++++++++-------- src/serverlist.h | 3 +-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index c063fb93..1ec5476d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ * bug fix: for mono capture jack audio interface Jamulus complains it cannot make connections (Ticket #137) +TODO implement panning for channels (Ticket #52, #145) + TODO improve help menu, see https://github.com/corrados/jamulus/issues/90 TODO support internationalization @@ -19,8 +21,6 @@ TODO sometimes I cannot see the central server in the server list TODO server: warning if Central server selected but OS location is different (e.g. US) -> warning in GUI and command line -TODO implement panning for channels (Ticket #52, #145) - TODO show mute state of others diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 69839a22..dc79c603 100755 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -31,13 +31,13 @@ CServerListManager::CServerListManager ( const quint16 iNPortNum, const int iNumChannels, const bool bNCentServPingServerInList, CProtocol* pNConLProt ) - : iNumPredefinedServers ( 0 ), + : tsConsoleStream ( *( ( new ConsoleWriterFactory() )->get() ) ), + iNumPredefinedServers ( 0 ), eCentralServerAddressType ( AT_MANUAL ), // must be AT_MANUAL for the "no GUI" case bCentServPingServerInList ( bNCentServPingServerInList ), pConnLessProtocol ( pNConLProt ), eSvrRegStatus ( SRS_UNREGISTERED ), - iSvrRegRetries ( 0 ), - tsConsoleStream ( *( ( new ConsoleWriterFactory() )->get() ) ) + iSvrRegRetries ( 0 ) { // set the central server address SetCentralServerAddress ( sNCentServAddr ); @@ -308,7 +308,7 @@ void CServerListManager::OnTimerPingServerInList() void CServerListManager::OnTimerPollList() { - CVector removals; + CVector vecRemovedHostAddr; QMutexLocker locker ( &Mutex ); @@ -322,7 +322,7 @@ void CServerListManager::OnTimerPollList() if ( ServerList[iIdx].RegisterTime.elapsed() > ( SERVLIST_TIME_OUT_MINUTES * 60000 ) ) { // remove this list entry - removals.Add ( ServerList[iIdx].HostAddr ); + vecRemovedHostAddr.Add ( ServerList[iIdx].HostAddr ); ServerList.removeAt ( iIdx ); } else @@ -331,11 +331,12 @@ void CServerListManager::OnTimerPollList() iIdx++; } } + locker.unlock(); - foreach ( const CHostAddress HostAddr , removals ) + + foreach ( const CHostAddress HostAddr, vecRemovedHostAddr ) { - tsConsoleStream << "Expired entry for " - << HostAddr.toString() << endl; + tsConsoleStream << "Expired entry for " << HostAddr.toString() << endl; } } diff --git a/src/serverlist.h b/src/serverlist.h index 5c6ca70e..decf9d72 100755 --- a/src/serverlist.h +++ b/src/serverlist.h @@ -186,6 +186,7 @@ protected: QTimer TimerCLRegisterServerResp; QMutex Mutex; + QTextStream& tsConsoleStream; QList ServerList; @@ -207,8 +208,6 @@ protected: // count of registration retries int iSvrRegRetries; - QTextStream& tsConsoleStream; - public slots: void OnTimerPollList(); void OnTimerPingServerInList();