mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-15 02:24:50 +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
|
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;
|
qDebug() << Q_FUNC_INFO;
|
||||||
Q_ASSERT( this->thread() == QThread::currentThread() );
|
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 );
|
cc->setName( name.isEmpty() ? QString( "KEY(%1)" ).arg( key ) : name );
|
||||||
if( !nodeid.isEmpty() )
|
if( !nodeid.isEmpty() )
|
||||||
cc->setId( nodeid );
|
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 );
|
registerOffer( _key, cc );
|
||||||
return _key;
|
return _key;
|
||||||
}
|
}
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
int port() const { return m_port; }
|
int port() const { return m_port; }
|
||||||
|
|
||||||
// creates new token that allows a controlconnection to be set up
|
// 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 );
|
void registerOffer( const QString& key, Connection* conn );
|
||||||
|
|
||||||
|
@@ -350,7 +350,7 @@ TwitterPlugin::registerOffer( const QString &screenName, const QHash< QString, Q
|
|||||||
if( needToAddToCache )
|
if( needToAddToCache )
|
||||||
{
|
{
|
||||||
qDebug() << "TwitterPlugin registering offer to " << node << " with node " << node << " and offeredkey " << _peerData["okey"].toString();
|
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 )
|
if( needToSend )
|
||||||
|
Reference in New Issue
Block a user