mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-18 23:09:42 +01: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:
parent
07a9486e4d
commit
95f3ead710
@ -123,16 +123,7 @@ ControlConnection::setup()
|
||||
return;
|
||||
}
|
||||
|
||||
QString friendlyName;
|
||||
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();
|
||||
QString friendlyName = name();
|
||||
|
||||
tDebug() << "Detected name:" << name() << friendlyName << m_sock->peerAddress();
|
||||
|
||||
|
@ -695,6 +695,8 @@ Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString
|
||||
bool
|
||||
Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialog ) const
|
||||
{
|
||||
Q_UNUSED( conn );
|
||||
Q_UNUSED( showDialog );
|
||||
tDebug( LOGVERBOSE ) << "Checking ACLs";
|
||||
|
||||
ACLSystem* aclSystem = ACLSystem::instance();
|
||||
|
@ -55,10 +55,13 @@ signals:
|
||||
public slots:
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
void resolve()
|
||||
{
|
||||
QHostInfo::lookupHost( ip, this, SLOT( resolved( QHostInfo ) ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user