mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 18:14:50 +02:00
* Fixed recursive message fetching bug.
This commit is contained in:
@@ -253,15 +253,11 @@ void
|
||||
DBSyncConnection::sendOps()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( m_lastSentOp.isEmpty() )
|
||||
m_lastSentOp = m_uscache.value( "lastop" ).toString();
|
||||
|
||||
qDebug() << "Will send peer all ops since" << m_lastSentOp;
|
||||
qDebug() << "Will send peer all ops since" << m_uscache.value( "lastop" ).toString();
|
||||
|
||||
source_ptr src = SourceList::instance()->getLocal();
|
||||
|
||||
DatabaseCommand_loadOps* cmd = new DatabaseCommand_loadOps( src, m_lastSentOp );
|
||||
DatabaseCommand_loadOps* cmd = new DatabaseCommand_loadOps( src, m_uscache.value( "lastop" ).toString() );
|
||||
connect( cmd, SIGNAL( done( QString, QString, QList< dbop_ptr > ) ),
|
||||
this, SLOT( sendOpsData( QString, QString, QList< dbop_ptr > ) ) );
|
||||
|
||||
@@ -273,8 +269,11 @@ void
|
||||
DBSyncConnection::sendOpsData( QString sinceguid, QString lastguid, QList< dbop_ptr > ops )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << sinceguid << lastguid << "Num ops to send:" << ops.length();
|
||||
m_lastSentOp = lastguid;
|
||||
|
||||
if ( m_lastSentOp == lastguid )
|
||||
ops.clear();
|
||||
|
||||
m_lastSentOp = lastguid;
|
||||
if( ops.length() == 0 )
|
||||
{
|
||||
sendMsg( Msg::factory( "ok", Msg::DBOP ) );
|
||||
|
Reference in New Issue
Block a user