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:
@@ -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;
|
||||
}
|
||||
|
@@ -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 );
|
||||
|
||||
|
@@ -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 )
|
||||
|
Reference in New Issue
Block a user