1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 17:43:59 +02:00

Remove onceOnly connection type for twitter sessions

This commit is contained in:
Jeff Mitchell
2011-02-12 23:29:52 -05:00
parent 64bb73ded2
commit a961b7086b
3 changed files with 5 additions and 4 deletions

View File

@@ -123,7 +123,7 @@ Servent::startListening( QHostAddress ha, bool upnp, int port )
QString
Servent::createConnectionKey( const QString& name, const QString &nodeid, const QString &key )
Servent::createConnectionKey( const QString& name, const QString &nodeid, const QString &key, bool onceOnly )
{
qDebug() << Q_FUNC_INFO;
Q_ASSERT( this->thread() == QThread::currentThread() );
@@ -133,7 +133,8 @@ Servent::createConnectionKey( const QString& name, const QString &nodeid, const
cc->setName( name.isEmpty() ? QString( "KEY(%1)" ).arg( key ) : name );
if( !nodeid.isEmpty() )
cc->setId( nodeid );
qDebug() << "Creating connection key with name of " << cc->name() << " and id of " << cc->id() << " and key of " << _key;
cc->setOnceOnly( onceOnly );
qDebug() << "Creating connection key with name of " << cc->name() << " and id of " << cc->id() << " and key of " << _key << "; key is once only? : " << (onceOnly ? "true" : "false");
registerOffer( _key, cc );
return _key;
}

View File

@@ -78,7 +78,7 @@ public:
int port() const { return m_port; }
// creates new token that allows a controlconnection to be set up
QString createConnectionKey( const QString& name = "", const QString &nodeid = "", const QString &key = "" );
QString createConnectionKey( const QString& name = "", const QString &nodeid = "", const QString &key = "", bool onceOnly = true );
void registerOffer( const QString& key, Connection* conn );

View File

@@ -350,7 +350,7 @@ TwitterPlugin::registerOffer( const QString &screenName, const QHash< QString, Q
if( needToAddToCache )
{
qDebug() << "TwitterPlugin registering offer to " << node << " with node " << node << " and offeredkey " << _peerData["okey"].toString();
m_keyCache << Servent::instance()->createConnectionKey( node, node, _peerData["okey"].toString() );
m_keyCache << Servent::instance()->createConnectionKey( node, node, _peerData["okey"].toString(), false );
}
if( needToSend )