1
0
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:
Christian Muehlhaeuser
2011-02-15 16:36:49 +01:00
parent c57c6f494b
commit edbb306e78

View File

@@ -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;