mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
Fix checking result of ACL against name
This commit is contained in:
@@ -194,7 +194,7 @@ Connection::checkACL()
|
|||||||
{
|
{
|
||||||
if ( !property( "nodeid" ).isValid() )
|
if ( !property( "nodeid" ).isValid() )
|
||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Not checking ACL, nodeid is empty";
|
tLog() << Q_FUNC_INFO << "Not checking ACL, nodeid is empty";
|
||||||
QTimer::singleShot( 0, this, SLOT( doSetup() ) );
|
QTimer::singleShot( 0, this, SLOT( doSetup() ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -210,8 +210,12 @@ Connection::checkACL()
|
|||||||
void
|
void
|
||||||
Connection::checkACLResult( const QString &nodeid, const QString &username, ACLRegistry::ACL peerStatus )
|
Connection::checkACLResult( const QString &nodeid, const QString &username, ACLRegistry::ACL peerStatus )
|
||||||
{
|
{
|
||||||
if ( nodeid != property( "nodeid" ).toString() || username != name() )
|
QString bareName = name().contains( '/' ) ? name().left( name().indexOf( "/" ) ) : name();
|
||||||
|
if ( nodeid != property( "nodeid" ).toString() || username != bareName )
|
||||||
|
{
|
||||||
|
tLog() << Q_FUNC_INFO << "nodeid not ours, or username not our barename";
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
disconnect( ACLRegistry::instance(), SIGNAL( aclResult( QString, QString, ACLRegistry::ACL ) ) );
|
disconnect( ACLRegistry::instance(), SIGNAL( aclResult( QString, QString, ACLRegistry::ACL ) ) );
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "ACL status is" << peerStatus;
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "ACL status is" << peerStatus;
|
||||||
|
Reference in New Issue
Block a user