1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-04 16:12:24 +02:00

Add more debugging and remove the don't-try-to-reconnect behavior

This commit is contained in:
Jeff Mitchell 2011-03-31 15:12:08 -04:00
parent 0c4e304ee5
commit 47451e4fba
3 changed files with 4 additions and 10 deletions

View File

@ -792,8 +792,11 @@ Servent::isIPWhitelisted( QHostAddress ip )
bool
Servent::connectedToSession( const QString& session )
{
qDebug() << Q_FUNC_INFO;
qDebug() << "Checking against " << session;
foreach( ControlConnection* cc, m_controlconnections )
{
qDebug() << "Checking session " << cc->id();
if( cc->id() == session )
return true;
}

View File

@ -178,7 +178,6 @@ TwitterPlugin::disconnectPlugin()
delete m_twitterAuth.data();
m_cachedPeers.empty();
m_attemptedConnects.empty();
m_isOnline = false;
}
@ -571,7 +570,6 @@ TwitterPlugin::registerOffer( const QString &screenName, const QHash< QString, Q
{
m_cachedPeers[screenName] = QVariant::fromValue< QHash< QString, QVariant > >( _peerData );
TomahawkSettings::instance()->setTwitterCachedPeers( m_cachedPeers );
m_attemptedConnects[screenName] = false;
}
if ( m_isOnline && _peerData.contains( "host" ) && _peerData.contains( "port" ) && _peerData.contains( "pkey" ) )
@ -597,14 +595,9 @@ void
TwitterPlugin::makeConnection( const QString &screenName, const QHash< QString, QVariant > &peerData )
{
qDebug() << Q_FUNC_INFO;
if ( m_attemptedConnects.contains( screenName ) && m_attemptedConnects[screenName] )
{
qDebug() << "Already attempted to connect to " << screenName << " with no change in their status, not trying again for now";
return;
}
if ( !peerData.contains( "host" ) || !peerData.contains( "port" ) || !peerData.contains( "pkey" ) || !peerData.contains( "node" ) )
{
qDebug() << "TwitterPlugin could not find host and/or port and/or pkey for peer " << screenName;
qDebug() << "TwitterPlugin could not find host and/or port and/or pkey and/or node for peer " << screenName;
return;
}
QString friendlyName = QString( '@' + screenName );
@ -614,7 +607,6 @@ TwitterPlugin::makeConnection( const QString &screenName, const QHash< QString,
peerData["pkey"].toString(),
friendlyName,
peerData["node"].toString() );
m_attemptedConnects[screenName] = true;
}
void

View File

@ -108,7 +108,6 @@ private:
qint64 m_cachedMentionsSinceId;
qint64 m_cachedDirectMessagesSinceId;
QHash< QString, QVariant > m_cachedPeers;
QHash< QString, bool > m_attemptedConnects;
QSet<QString> m_keyCache;
bool m_finishedFriends;
bool m_finishedMentions;