unregister server if it was registered and the Central Server type is changed
This commit is contained in:
parent
a41879e6b7
commit
9a6653525b
2 changed files with 8 additions and 5 deletions
|
@ -213,15 +213,12 @@ LED bar: lbr
|
||||||
#define SERVLIST_TIME_PERMSERV_MINUTES 1440 // minutes, 1440 = 60 min * 24 h
|
#define SERVLIST_TIME_PERMSERV_MINUTES 1440 // minutes, 1440 = 60 min * 24 h
|
||||||
|
|
||||||
// registration response timeout
|
// registration response timeout
|
||||||
#define REGISTER_SERVER_TIME_OUT_MS 500 // ms
|
#define REGISTER_SERVER_TIME_OUT_MS 500 // ms
|
||||||
|
|
||||||
// defines the maximum number of times to retry server registration
|
// defines the maximum number of times to retry server registration
|
||||||
// when no response is received within the timeout (before reverting
|
// when no response is received within the timeout (before reverting
|
||||||
// to SERVLIST_REGIST_INTERV_MINUTES)
|
// to SERVLIST_REGIST_INTERV_MINUTES)
|
||||||
#define REGISTER_SERVER_RETRY_LIMIT 5 // count
|
#define REGISTER_SERVER_RETRY_LIMIT 5 // count
|
||||||
|
|
||||||
// length of the moving average buffer for response time measurement
|
|
||||||
#define TIME_MOV_AV_RESPONSE_SECONDS 30 // seconds
|
|
||||||
|
|
||||||
|
|
||||||
// Maximum length of fader tag and text message strings (Since for chat messages
|
// Maximum length of fader tag and text message strings (Since for chat messages
|
||||||
|
|
|
@ -447,6 +447,12 @@ void CServerDlg::OnLocationCountryActivated ( int iCntryListItem )
|
||||||
|
|
||||||
void CServerDlg::OnCentServAddrTypeActivated ( int iTypeIdx )
|
void CServerDlg::OnCentServAddrTypeActivated ( int iTypeIdx )
|
||||||
{
|
{
|
||||||
|
// if server was registered, unregister first
|
||||||
|
if ( pServer->GetServerListEnabled() )
|
||||||
|
{
|
||||||
|
pServer->UnregisterSlaveServer();
|
||||||
|
}
|
||||||
|
|
||||||
// apply new setting to the server and update it
|
// apply new setting to the server and update it
|
||||||
pServer->SetCentralServerAddressType ( static_cast<ECSAddType> ( iTypeIdx ) );
|
pServer->SetCentralServerAddressType ( static_cast<ECSAddType> ( iTypeIdx ) );
|
||||||
pServer->UpdateServerList();
|
pServer->UpdateServerList();
|
||||||
|
|
Loading…
Reference in a new issue