mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 13:21:52 +02:00
Merge branch 'stable'
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
Version 0.0.3:
|
||||||
|
* Properly honor the chosen port number if a static host and port are
|
||||||
|
marked as preferred.
|
||||||
|
|
||||||
Version 0.0.2:
|
Version 0.0.2:
|
||||||
* Don't reconnect to Jabber if the settings dialog is closed successfully
|
* Don't reconnect to Jabber if the settings dialog is closed successfully
|
||||||
but the Jabber settings haven't changed.
|
but the Jabber settings haven't changed.
|
||||||
|
@@ -19,8 +19,6 @@
|
|||||||
#ifndef SERVENT_H
|
#ifndef SERVENT_H
|
||||||
#define SERVENT_H
|
#define SERVENT_H
|
||||||
|
|
||||||
// port for servent to listen on
|
|
||||||
#define DEFAULT_LISTEN_PORT 50210
|
|
||||||
// time before new connection terminates if no auth received
|
// time before new connection terminates if no auth received
|
||||||
#define AUTH_TIMEOUT 180000
|
#define AUTH_TIMEOUT 180000
|
||||||
|
|
||||||
@@ -91,7 +89,7 @@ public:
|
|||||||
explicit Servent( QObject* parent = 0 );
|
explicit Servent( QObject* parent = 0 );
|
||||||
virtual ~Servent();
|
virtual ~Servent();
|
||||||
|
|
||||||
bool startListening( QHostAddress ha, bool upnp = false, int port = DEFAULT_LISTEN_PORT );
|
bool startListening( QHostAddress ha, bool upnp, int port );
|
||||||
|
|
||||||
int port() const { return m_port; }
|
int port() const { return m_port; }
|
||||||
|
|
||||||
|
@@ -465,8 +465,9 @@ TomahawkApp::initLocalCollection()
|
|||||||
void
|
void
|
||||||
TomahawkApp::startServent()
|
TomahawkApp::startServent()
|
||||||
{
|
{
|
||||||
bool upnp = !arguments().contains( "--noupnp" ) && TomahawkSettings::instance()->value( "network/upnp", true ).toBool();
|
bool upnp = !arguments().contains( "--noupnp" ) && TomahawkSettings::instance()->value( "network/upnp", true ).toBool() && !TomahawkSettings::instance()->preferStaticHostPort();
|
||||||
if ( !Servent::instance()->startListening( QHostAddress( QHostAddress::Any ), upnp ) )
|
int port = TomahawkSettings::instance()->externalPort();
|
||||||
|
if ( !Servent::instance()->startListening( QHostAddress( QHostAddress::Any ), upnp, port ) )
|
||||||
{
|
{
|
||||||
qDebug() << "Failed to start listening with servent";
|
qDebug() << "Failed to start listening with servent";
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
|
Reference in New Issue
Block a user