From 527fb8660826746f2afe35c28257ef19f5ca75c3 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 17 May 2013 00:23:08 +0200 Subject: [PATCH] Make more use of peerInfoDebug --- src/libtomahawk/network/Servent.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libtomahawk/network/Servent.cpp b/src/libtomahawk/network/Servent.cpp index 3dad48481..b70cd330c 100644 --- a/src/libtomahawk/network/Servent.cpp +++ b/src/libtomahawk/network/Servent.cpp @@ -869,9 +869,9 @@ Servent::connectToPeer(const peerinfo_ptr& peerInfo, const QList& sipIn if ( sipInfos.isEmpty() ) { if ( conn != NULL ) { - tLog( LOGVERBOSE ) << Q_FUNC_INFO << "No more possible SIP endpoints for " << conn->name() << " skipping."; + peerInfoDebug(peerInfo) << Q_FUNC_INFO << "No more possible SIP endpoints for " << conn->name() << " skipping."; } else { - tLog( LOGVERBOSE ) << Q_FUNC_INFO << "No more possible SIP endpoints for skipping."; + peerInfoDebug(peerInfo) << Q_FUNC_INFO << "No more possible SIP endpoints for skipping."; } // If a peerinfo was supplied and has a ControlConnection which should be destroyed, than use this if ( !peerInfo.isNull() && peerInfo->controlConnection() ) @@ -881,17 +881,17 @@ Servent::connectToPeer(const peerinfo_ptr& peerInfo, const QList& sipIn delete conn; return; } - QList sipInfo = QList(sipInfos); + QList sipInfo = QList( sipInfos ); // Use first available SIP endpoint and remove it from the list SipInfo info = sipInfo.takeFirst(); if ( !info.isVisible() ) { - // Try next SipInfo, we can't connect to this one + peerInfoDebug(peerInfo) << Q_FUNC_INFO << "Try next SipInfo, we can't connect to this one"; connectToPeer( peerInfo, sipInfo, conn ); return; } - tDebug( LOGVERBOSE ) << "Servent::connectToPeer:" << info.host() << ":" << info.port() << thread() << QThread::currentThread(); + peerInfoDebug(peerInfo) << Q_FUNC_INFO << info.host() << ":" << info.port() << thread() << QThread::currentThread(); Q_ASSERT( info.port() > 0 ); Q_ASSERT( conn ); @@ -901,14 +901,14 @@ Servent::connectToPeer(const peerinfo_ptr& peerInfo, const QList& sipIn { if ( QHostAddress( info.host() ) == ha) { - tDebug() << "Tomahawk won't try to connect to" << info.host() << ":" << info.port() << ": same IP as ourselves."; + peerInfoDebug(peerInfo) << Q_FUNC_INFO << "Tomahawk won't try to connect to" << info.host() << ":" << info.port() << ": same IP as ourselves."; connectToPeer( peerInfo, sipInfo, conn ); return; } } if ( info.host() == m_externalHostname ) { - tDebug() << "Tomahawk won't try to connect to" << info.host() << ":" << info.port() << ": same IP as ourselves."; + peerInfoDebug(peerInfo) << Q_FUNC_INFO << "Tomahawk won't try to connect to" << info.host() << ":" << info.port() << ": same IP as ourselves."; connectToPeer( peerInfo, sipInfo, conn ); return; } @@ -943,7 +943,7 @@ Servent::connectToPeer(const peerinfo_ptr& peerInfo, const QList& sipIn void Servent::connectToPeerFailed( const peerinfo_ptr& peerInfo, QList sipInfo, Connection* conn, QTcpSocketExtra* socket ) { - tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Connecting to " << socket->peerAddress().toString() << " failed: " << socket->errorString(); + peerInfoDebug(peerInfo) << Q_FUNC_INFO << "Connecting to " << socket->peerAddress().toString() << " failed: " << socket->errorString(); bool connIsNull = socket->_conn.isNull(); cleanupSocket( socket );