mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 17:42:35 +02:00
Keep track of offered dbid to a peer and check offer key to make sure it matches
This commit is contained in:
parent
a52ecfb5b8
commit
73d88dcf7b
@ -536,11 +536,14 @@ TwitterPlugin::registerOffer( const QString &screenName, const QHash< QString, Q
|
||||
_peerData.remove( "resend" );
|
||||
}
|
||||
|
||||
if ( !_peerData.contains( "okey" ) )
|
||||
if ( !_peerData.contains( "okey" ) ||
|
||||
!_peerData.contains( "onod" ) ||
|
||||
( _peerData.contains( "onod" ) && _peerData["onod"] != Database::instance()->dbid() ) )
|
||||
{
|
||||
QString okey = QUuid::createUuid().toString().split( '-' ).last();
|
||||
okey.chop( 1 );
|
||||
_peerData["okey"] = QVariant::fromValue< QString >( okey );
|
||||
_peerData["onod"] = QVariant::fromValue< QString >( Database::instance()->dbid() );
|
||||
peersChanged = true;
|
||||
needToAddToCache = true;
|
||||
needToSend = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user