changed the default central server URL

This commit is contained in:
Volker Fischer 2015-10-18 19:07:43 +00:00
parent b5bae73ab3
commit b63a625ffa
7 changed files with 45 additions and 27 deletions

View file

@ -1,10 +1,10 @@
3.3.10 3.3.10
- changed the default central server URL
- added support for server disconnection - added support for server disconnection
3.3.9 3.3.9
- another improvement of auto jitter buffer detection in very bad - another improvement of auto jitter buffer detection in very bad

View file

@ -629,7 +629,7 @@ void CClientDlg::OnAudioPanValueChanged ( int value )
void CClientDlg::OnConnectDlgAccepted() void CClientDlg::OnConnectDlgAccepted()
{ {
// get the address from the connect dialog // get the address from the connect dialog
const QString strSelectedAddress = ConnectDlg.GetSelectedAddress(); QString strSelectedAddress = ConnectDlg.GetSelectedAddress();
// only store new host address in our data base if the address is // only store new host address in our data base if the address is
// not empty and it was not a server list item (only the addresses // not empty and it was not a server list item (only the addresses
@ -657,6 +657,16 @@ void CClientDlg::OnConnectDlgAccepted()
// just show the address string as it was entered by the // just show the address string as it was entered by the
// user // user
strMixerBoardLabel = strSelectedAddress; strMixerBoardLabel = strSelectedAddress;
// special case: if the address is empty, we substitude the default
// central server address so that a user which just pressed the connect
// button without selecting an item in the table or manually entered an
// address gets a successful connection
if ( strSelectedAddress.isEmpty() )
{
strSelectedAddress = DEFAULT_SERVER_ADDRESS;
strMixerBoardLabel = DEFAULT_SERVER_NAME;
}
} }
// first check if we are already connected, if this is the case we have to // first check if we are already connected, if this is the case we have to

View file

@ -548,14 +548,21 @@ void CClientSettingsDlg::UpdateCentralServerDependency()
const bool bCurUseDefCentServAddr = const bool bCurUseDefCentServAddr =
pClient->GetUseDefaultCentralServerAddress(); pClient->GetUseDefaultCentralServerAddress();
// If the default central server address is enabled, the line edit shows // make sure the line edit does not fire signals when we update the text
// the default server and is not editable. Make sure the line edit does not
// fire signals when we update the text.
edtCentralServerAddress->blockSignals ( true ); edtCentralServerAddress->blockSignals ( true );
{ {
if ( bCurUseDefCentServAddr )
{
// if the default central server is used, just show a text of the
// server name
edtCentralServerAddress->setText ( DEFAULT_SERVER_NAME );
}
else
{
// show the current user defined server address
edtCentralServerAddress->setText ( edtCentralServerAddress->setText (
SELECT_SERVER_ADDRESS ( bCurUseDefCentServAddr, pClient->GetServerListCentralServerAddress() );
pClient->GetServerListCentralServerAddress() ) ); }
} }
edtCentralServerAddress->blockSignals ( false ); edtCentralServerAddress->blockSignals ( false );

View file

@ -57,8 +57,8 @@ CConnectDlg::CConnectDlg ( const bool bNewShowCompleteRegList,
QString strServAddrH = tr ( "<b>Server Address:</b> The IP address or URL " QString strServAddrH = tr ( "<b>Server Address:</b> The IP address or URL "
"of the server running the " ) + APP_NAME + tr ( " server software " "of the server running the " ) + APP_NAME + tr ( " server software "
"must be set here. An optional port number can be added after the IP " "must be set here. An optional port number can be added after the IP "
"address or URL using a comma as a separator, e.g, <i>" ) + "address or URL using a comma as a separator, e.g, <i>"
DEFAULT_SERVER_ADDRESS + ":" + "example.org:" ) +
QString().setNum ( LLCON_DEFAULT_PORT_NUMBER ) + tr ( "</i>. A list of " QString().setNum ( LLCON_DEFAULT_PORT_NUMBER ) + tr ( "</i>. A list of "
"the most recent used server IP addresses or URLs is available for " "the most recent used server IP addresses or URLs is available for "
"selection." ); "selection." );
@ -143,6 +143,7 @@ void CConnectDlg::Init ( const QString strNewCentralServerAddr,
// load stored IP addresses in combo box // load stored IP addresses in combo box
cbxServerAddr->clear(); cbxServerAddr->clear();
cbxServerAddr->clearEditText();
for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ ) for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ )
{ {

View file

@ -90,7 +90,8 @@ LED bar: lbr
#define DEFAULT_LOG_FILE_NAME "Jamulussrvlog.txt" #define DEFAULT_LOG_FILE_NAME "Jamulussrvlog.txt"
// default server address // default server address
#define DEFAULT_SERVER_ADDRESS "jamulus.dyndns.org" #define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de"
#define DEFAULT_SERVER_NAME "Central Server"
#define SELECT_SERVER_ADDRESS(a, b) ((a) ? (DEFAULT_SERVER_ADDRESS) : (b)) #define SELECT_SERVER_ADDRESS(a, b) ((a) ? (DEFAULT_SERVER_ADDRESS) : (b))
// download URL // download URL

View file

@ -493,14 +493,21 @@ void CServerDlg::UpdateGUIDependencies()
chbDefaultCentralServer->setEnabled ( bCurSerListEnabled ); chbDefaultCentralServer->setEnabled ( bCurSerListEnabled );
grbServerInfo->setEnabled ( bCurSerListEnabled ); grbServerInfo->setEnabled ( bCurSerListEnabled );
// If the default central server address is enabled, the line edit shows // make sure the line edit does not fire signals when we update the text
// the default server and is not editable. Make sure the line edit does not
// fire signals when we update the text.
edtCentralServerAddress->blockSignals ( true ); edtCentralServerAddress->blockSignals ( true );
{ {
if ( bCurUseDefCentServAddr )
{
// if the default central server is used, just show a text of the
// server name
edtCentralServerAddress->setText ( DEFAULT_SERVER_NAME );
}
else
{
// show the current user defined server address
edtCentralServerAddress->setText ( edtCentralServerAddress->setText (
SELECT_SERVER_ADDRESS ( bCurUseDefCentServAddr, pServer->GetServerListCentralServerAddress() );
pServer->GetServerListCentralServerAddress() ) ); }
} }
edtCentralServerAddress->blockSignals ( false ); edtCentralServerAddress->blockSignals ( false );

View file

@ -53,17 +53,9 @@ void CSettings::Load()
// IP addresses // IP addresses
for ( iIdx = 0; iIdx < MAX_NUM_SERVER_ADDR_ITEMS; iIdx++ ) for ( iIdx = 0; iIdx < MAX_NUM_SERVER_ADDR_ITEMS; iIdx++ )
{ {
QString sDefaultIP = "";
// use default only for first entry
if ( iIdx == 0 )
{
sDefaultIP = DEFAULT_SERVER_ADDRESS;
}
pClient->vstrIPAddress[iIdx] = pClient->vstrIPAddress[iIdx] =
GetIniSetting ( IniXMLDocument, "client", GetIniSetting ( IniXMLDocument, "client",
QString ( "ipaddress%1" ).arg ( iIdx ), sDefaultIP ); QString ( "ipaddress%1" ).arg ( iIdx ), "" );
} }
// stored fader tags // stored fader tags