unregister server if it was registered and the Central Server type is changed

This commit is contained in:
Volker Fischer 2020-05-01 20:21:33 +02:00
parent a41879e6b7
commit 9a6653525b
2 changed files with 8 additions and 5 deletions

View file

@ -220,9 +220,6 @@ LED bar: lbr
// to SERVLIST_REGIST_INTERV_MINUTES)
#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
// some HTML code is added, we also have to define a second length which includes

View file

@ -447,6 +447,12 @@ void CServerDlg::OnLocationCountryActivated ( int iCntryListItem )
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
pServer->SetCentralServerAddressType ( static_cast<ECSAddType> ( iTypeIdx ) );
pServer->UpdateServerList();