mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-15 10:33:59 +02:00
When using UPnP mode and it doens't work and you have an external
address/port set, fall back to using those.
This commit is contained in:
@@ -146,8 +146,17 @@ Servent::setExternalAddress( QHostAddress ha, unsigned int port )
|
|||||||
m_externalAddress = ha;
|
m_externalAddress = ha;
|
||||||
m_externalPort = port;
|
m_externalPort = port;
|
||||||
|
|
||||||
if( m_externalPort == 0 )
|
if( m_externalPort == 0 || m_externalAddress.toString().isEmpty() )
|
||||||
{
|
{
|
||||||
|
if( !TomahawkSettings::instance()->externalHostname().isEmpty() &&
|
||||||
|
!TomahawkSettings::instance()->externalPort() == 0 )
|
||||||
|
{
|
||||||
|
qDebug() << "UPnP failed, have external address/port -- falling back";
|
||||||
|
m_externalHostname = TomahawkSettings::instance()->externalHostname();
|
||||||
|
m_externalPort = TomahawkSettings::instance()->externalPort();
|
||||||
|
qDebug() << m_externalHostname << m_externalPort;
|
||||||
|
}
|
||||||
|
else
|
||||||
qDebug() << "No external access, LAN and outbound connections only!";
|
qDebug() << "No external access, LAN and outbound connections only!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user