mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Remove extraneous local IP checks; let the plugin set the name and don't
try to adjust it based on IP.
This commit is contained in:
@@ -123,16 +123,7 @@ ControlConnection::setup()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString friendlyName;
|
QString friendlyName = name();
|
||||||
if ( Servent::isIPWhitelisted( m_sock->peerAddress() ) )
|
|
||||||
{
|
|
||||||
// FIXME TODO blocking DNS lookup if LAN, slow/fails on windows?
|
|
||||||
QHostInfo i = QHostInfo::fromName( m_sock->peerAddress().toString() );
|
|
||||||
if( i.hostName().length() )
|
|
||||||
friendlyName = i.hostName();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
friendlyName = name();
|
|
||||||
|
|
||||||
tDebug() << "Detected name:" << name() << friendlyName << m_sock->peerAddress();
|
tDebug() << "Detected name:" << name() << friendlyName << m_sock->peerAddress();
|
||||||
|
|
||||||
|
@@ -695,6 +695,8 @@ Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString
|
|||||||
bool
|
bool
|
||||||
Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialog ) const
|
Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialog ) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( conn );
|
||||||
|
Q_UNUSED( showDialog );
|
||||||
tDebug( LOGVERBOSE ) << "Checking ACLs";
|
tDebug( LOGVERBOSE ) << "Checking ACLs";
|
||||||
|
|
||||||
ACLSystem* aclSystem = ACLSystem::instance();
|
ACLSystem* aclSystem = ACLSystem::instance();
|
||||||
|
@@ -55,7 +55,10 @@ signals:
|
|||||||
public slots:
|
public slots:
|
||||||
void resolved( QHostInfo i )
|
void resolved( QHostInfo i )
|
||||||
{
|
{
|
||||||
emit tomahawkHostFound( ip, port, i.hostName(), nid );
|
if ( i.hostName().length() )
|
||||||
|
emit tomahawkHostFound( ip, port, i.hostName(), nid );
|
||||||
|
else
|
||||||
|
emit tomahawkHostFound( ip, port, "Unknown", nid );
|
||||||
this->deleteLater();
|
this->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user