Skip to content

Commit 584a33e

Browse files
authored
Merge pull request jamulussoftware#3738 from seanogdelaney/fix-startup-connect-no-gui
2 parents 7f55994 + 7e8750c commit 584a33e

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/client.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
/* Implementation *************************************************************/
5252
CClient::CClient ( const quint16 iPortNumber,
5353
const quint16 iQosNumber,
54-
const QString& strConnOnStartupAddress,
5554
const bool bNoAutoJackConnect,
5655
const QString& strNClientName,
5756
const bool bNDisableIPv6,
@@ -212,13 +211,6 @@ CClient::CClient ( const quint16 iPortNumber,
212211
// start the socket (it is important to start the socket after all
213212
// initializations and connections)
214213
Socket.Start();
215-
216-
// do an immediate start if a server address is given
217-
if ( !strConnOnStartupAddress.isEmpty() )
218-
{
219-
SetServerAddr ( strConnOnStartupAddress );
220-
Start();
221-
}
222214
}
223215

224216
// MIDI setup will be handled after settings are assigned

src/client.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ class CClient : public QObject
150150
public:
151151
CClient ( const quint16 iPortNumber,
152152
const quint16 iQosNumber,
153-
const QString& strConnOnStartupAddress,
154153
const bool bNoAutoJackConnect,
155154
const QString& strNClientName,
156155
const bool bNDisableIPv6,

src/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,7 @@ int main ( int argc, char** argv )
951951
#ifndef SERVER_ONLY
952952
if ( bIsClient )
953953
{
954-
CClient
955-
Client ( iPortNumber, iQosNumber, strConnOnStartupAddress, bNoAutoJackConnect, strClientName, bDisableIPv6, bMuteMeInPersonalMix );
954+
CClient Client ( iPortNumber, iQosNumber, bNoAutoJackConnect, strClientName, bDisableIPv6, bMuteMeInPersonalMix );
956955

957956
// Create Settings with the client pointer
958957
CClientSettings Settings ( &Client, strIniFileName );
@@ -988,6 +987,12 @@ int main ( int argc, char** argv )
988987
else
989988
# endif
990989
{
990+
if ( !strConnOnStartupAddress.isEmpty() )
991+
{
992+
Client.SetServerAddr ( strConnOnStartupAddress );
993+
Client.Start();
994+
}
995+
991996
// only start application without using the GUI
992997
qInfo() << qUtf8Printable ( GetVersionAndNameStr ( false ) );
993998

0 commit comments

Comments
 (0)