added SRR_NOT_FULFILL_REQIREMENTS server registration status

This commit is contained in:
Volker Fischer 2020-06-23 17:51:47 +02:00
parent 600333a415
commit f3eb0b3baa
4 changed files with 15 additions and 3 deletions

View File

@ -382,6 +382,7 @@ CONNECTION LESS MESSAGES
0 - success 0 - success
1 - failed due to central server list being full 1 - failed due to central server list being full
2 - your server version is too old 2 - your server version is too old
3 - registration requirements not fulfilled
Note: the central server may send this message in response to a Note: the central server may send this message in response to a
PROTMESSID_CLM_REGISTER_SERVER request. PROTMESSID_CLM_REGISTER_SERVER request.
@ -2381,7 +2382,8 @@ bool CProtocol::EvaluateCLRegisterServerResp ( const CHostAddress& InetAddr,
if ( ( iSvrRegResult != SRR_REGISTERED ) && if ( ( iSvrRegResult != SRR_REGISTERED ) &&
( iSvrRegResult != SRR_CENTRAL_SVR_FULL ) && ( iSvrRegResult != SRR_CENTRAL_SVR_FULL ) &&
( iSvrRegResult != SRR_VERSION_TOO_OLD ) ) ( iSvrRegResult != SRR_VERSION_TOO_OLD ) &&
( iSvrRegResult != SRR_NOT_FULFILL_REQIREMENTS ) )
{ {
return true; return true;
} }

View File

@ -637,6 +637,7 @@ void CServerDlg::UpdateGUIDependencies()
case SRS_TIME_OUT: case SRS_TIME_OUT:
case SRS_CENTRAL_SVR_FULL: case SRS_CENTRAL_SVR_FULL:
case SRS_VERSION_TOO_OLD: case SRS_VERSION_TOO_OLD:
case SRS_NOT_FULFILL_REQIREMENTS:
strStatus = "<font color=""red""><b>" + strStatus + "</b></font>"; strStatus = "<font color=""red""><b>" + strStatus + "</b></font>";
break; break;

View File

@ -515,6 +515,10 @@ void CServerListManager::StoreRegistrationResult ( ESvrRegResult eResult )
SetSvrRegStatus ( ESvrRegStatus::SRS_VERSION_TOO_OLD ); SetSvrRegStatus ( ESvrRegStatus::SRS_VERSION_TOO_OLD );
break; break;
case ESvrRegResult::SRR_NOT_FULFILL_REQIREMENTS:
SetSvrRegStatus ( ESvrRegStatus::SRS_NOT_FULFILL_REQIREMENTS );
break;
default: default:
SetSvrRegStatus ( ESvrRegStatus::SRS_UNKNOWN_RESP ); SetSvrRegStatus ( ESvrRegStatus::SRS_UNKNOWN_RESP );
break; break;

View File

@ -632,7 +632,8 @@ enum ESvrRegStatus
SRS_UNKNOWN_RESP, SRS_UNKNOWN_RESP,
SRS_REGISTERED, SRS_REGISTERED,
SRS_CENTRAL_SVR_FULL, SRS_CENTRAL_SVR_FULL,
SRS_VERSION_TOO_OLD SRS_VERSION_TOO_OLD,
SRS_NOT_FULFILL_REQIREMENTS
}; };
inline QString svrRegStatusToString ( ESvrRegStatus eSvrRegStatus ) inline QString svrRegStatusToString ( ESvrRegStatus eSvrRegStatus )
@ -662,6 +663,9 @@ inline QString svrRegStatusToString ( ESvrRegStatus eSvrRegStatus )
case SRS_VERSION_TOO_OLD: case SRS_VERSION_TOO_OLD:
return QCoreApplication::translate ( "CServerDlg", "Your server version is too old" ); return QCoreApplication::translate ( "CServerDlg", "Your server version is too old" );
case SRS_NOT_FULFILL_REQIREMENTS:
return QCoreApplication::translate ( "CServerDlg", "Requirements not fulfilled" );
} }
return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ).append ( eSvrRegStatus ); return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ).append ( eSvrRegStatus );
@ -674,7 +678,8 @@ enum ESvrRegResult
// used for protocol -> enum values must be fixed! // used for protocol -> enum values must be fixed!
SRR_REGISTERED = 0, SRR_REGISTERED = 0,
SRR_CENTRAL_SVR_FULL = 1, SRR_CENTRAL_SVR_FULL = 1,
SRR_VERSION_TOO_OLD = 2 SRR_VERSION_TOO_OLD = 2,
SRR_NOT_FULFILL_REQIREMENTS = 3
}; };