small merge fixes

This commit is contained in:
Volker Fischer 2020-04-18 08:39:08 +02:00
parent 8ab4bd253a
commit 4edb160a0a
5 changed files with 23 additions and 10 deletions

View file

@ -19,14 +19,16 @@
* the ping times in the server list are now more stable
TODO offer the Jamulus ASIO settingspanel in case of an ASIO ERROR to fix, e.g., incorrect sample rate (https://sourceforge.net/p/llcon/discussion/533517/thread/777663cf94/#035f)
TODO try to find a way to catch Windows exceptions in case a 64 bit Jamulus tries to load a 32 bit Jack Audio ASIO dll
TODO store Show All Musicians setting in the ini-file
TODO bug fix: "Start up the new version with the Connection Setup showing. "Show all musicians" is on (as I say). Switch it off before the list is displayed. The
checkbox is off - but the list displays all musicians! You need to turn it on and off again to get it to do its thing. (If you wait a little, it's fine -
i.e. before it's populated the musicians but after it's displayed the list, turn it off.)", see https://github.com/corrados/jamulus/issues/78
TODO offer the Jamulus ASIO settingspanel in case of an ASIO ERROR to fix, e.g., incorrect sample rate (https://sourceforge.net/p/llcon/discussion/533517/thread/777663cf94/#035f)
TODO the server list filter seems not to work if --showallservers is used
TODO store Central Server jamulus.server start scripts on the Repo (one for Central Server, one for Central Server North America)

View file

@ -192,6 +192,7 @@ public:
ESvrRegStatus GetSvrRegStatus() { return ServerListManager.GetSvrRegStatus(); }
// GUI settings ------------------------------------------------------------
void SetAutoRunMinimized ( const bool NAuRuMin ) { bAutoRunMinimized = NAuRuMin; }
bool GetAutoRunMinimized() { return bAutoRunMinimized; }

View file

@ -546,32 +546,38 @@ void CServerDlg::UpdateGUIDependencies()
!bCurUseDefCentServAddr && bCurSerListEnabled );
QString strStatus;
switch ( eSvrRegStatus )
{
case SRS_UNREGISTERED:
strStatus = "Unregistered";
break;
case SRS_BAD_ADDRESS:
strStatus = "Bad address";
break;
case SRS_REQUESTED:
strStatus = "Registration requested";
break;
case SRS_TIME_OUT:
strStatus = "Using longer retries";
break;
case SRS_UNKNOWN_RESP:
strStatus = "Check server version, retrying";
break;
case SRS_REGISTERED:
strStatus = "Registered";
break;
case SRS_CENTRAL_SVR_FULL:
strStatus = "Central Server full";
break;
}
lblRegSvrStatus->setText( strStatus );
}
void CServerDlg::UpdateSystemTrayIcon ( const bool bIsActive )

View file

@ -166,6 +166,10 @@ CServerListManager::CServerListManager ( const quint16 iNPortNum,
this, SLOT ( OnTimerIsPermanent() ) );
}
// prepare the register server response timer (single shot timer)
TimerCLRegisterServerResp.setSingleShot ( true );
TimerCLRegisterServerResp.setInterval ( REGISTER_SERVER_TIME_OUT_MS );
// Connections -------------------------------------------------------------
QObject::connect ( &TimerPollList, SIGNAL ( timeout() ),
@ -180,8 +184,6 @@ CServerListManager::CServerListManager ( const quint16 iNPortNum,
QObject::connect ( &TimerRegistering, SIGNAL ( timeout() ),
this, SLOT ( OnTimerRegistering() ) );
TimerCLRegisterServerResp.setSingleShot ( true );
TimerCLRegisterServerResp.setInterval ( REGISTER_SERVER_TIME_OUT_MS );
QObject::connect ( &TimerCLRegisterServerResp, SIGNAL ( timeout() ),
this, SLOT ( OnTimerCLRegisterServerResp() ) );
}
@ -314,15 +316,14 @@ void CServerListManager::OnTimerPollList()
for ( int iIdx = 1 + iNumPredefinedServers; iIdx < ServerList.size(); )
{
// 1 minute = 60 * 1000 ms
if ( ServerList[iIdx].RegisterTime.elapsed() >
( SERVLIST_TIME_OUT_MINUTES * 60000 ) )
if ( ServerList[iIdx].RegisterTime.elapsed() > ( SERVLIST_TIME_OUT_MINUTES * 60000 ) )
{
// remove this list entry
ServerList.removeAt ( iIdx );
}
else
{
// Move to the next entry (only on else)
// move to the next entry (only on else)
iIdx++;
}
}
@ -482,16 +483,17 @@ void CServerListManager::StoreRegistrationResult ( ESvrRegResult eResult )
// any time so another response could arrive
QMutexLocker locker ( &Mutex );
// We got some response, so stop the retry timer
// we got some response, so stop the retry timer
TimerCLRegisterServerResp.stop();
eSvrRegStatus = ESvrRegStatus::SRS_UNKNOWN_RESP;
switch ( eResult )
switch ( eResult )
{
case ESvrRegResult::SRR_REGISTERED:
eSvrRegStatus = ESvrRegStatus::SRS_REGISTERED;
break;
case ESvrRegResult::SRR_CENTRAL_SVR_FULL:
eSvrRegStatus = ESvrRegStatus::SRS_CENTRAL_SVR_FULL;
break;
@ -520,6 +522,7 @@ void CServerListManager::OnTimerCLRegisterServerResp()
if ( eSvrRegStatus == SRS_REQUESTED )
{
iSvrRegRetries++;
if ( iSvrRegRetries >= REGISTER_SERVER_RETRY_LIMIT )
{
eSvrRegStatus = SRS_TIME_OUT;

View file

@ -588,6 +588,7 @@ enum ESvrRegStatus
// Central server registration outcome -----------------------------------------
enum ESvrRegResult
{
// used for protocol -> enum values must be fixed!
SRR_REGISTERED = 0,
SRR_CENTRAL_SVR_FULL = 1
};