mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
* Should fix announcing ourselves with an internal IP.
This commit is contained in:
@@ -107,8 +107,14 @@ Servent::startListening( QHostAddress ha, bool upnp, int port )
|
|||||||
{
|
{
|
||||||
if( ha.toString() == "127.0.0.1" ) continue;
|
if( ha.toString() == "127.0.0.1" ) continue;
|
||||||
if( ha.toString().contains( ":" ) ) continue; //ipv6
|
if( ha.toString().contains( ":" ) ) continue; //ipv6
|
||||||
QMetaObject::invokeMethod( this, "setExternalAddress", Qt::QueuedConnection, Q_ARG( QHostAddress, ha ), Q_ARG( unsigned int, m_port ) );
|
|
||||||
|
if ( qApp->arguments().contains( "--lanhack" ) )
|
||||||
|
{
|
||||||
qDebug() << "LANHACK: set external address to lan address" << ha.toString();
|
qDebug() << "LANHACK: set external address to lan address" << ha.toString();
|
||||||
|
QMetaObject::invokeMethod( this, "setExternalAddress", Qt::QueuedConnection, Q_ARG( QHostAddress, ha ), Q_ARG( unsigned int, m_port ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
emit ready();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user