mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
* Fixed DatabaseWorker logic.
This commit is contained in:
@@ -111,7 +111,7 @@ DatabaseWorker::doWork()
|
|||||||
{
|
{
|
||||||
cmd->_exec( m_dbimpl ); // runs actual SQL stuff
|
cmd->_exec( m_dbimpl ); // runs actual SQL stuff
|
||||||
|
|
||||||
if ( cmd->loggable() && !cmd->localOnly() )
|
if ( cmd->loggable() )
|
||||||
{
|
{
|
||||||
// We only save our own ops to the oplog, since incoming ops from peers
|
// We only save our own ops to the oplog, since incoming ops from peers
|
||||||
// are applied immediately.
|
// are applied immediately.
|
||||||
@@ -119,7 +119,7 @@ DatabaseWorker::doWork()
|
|||||||
// Crazy idea: if peers had keypairs and could sign ops/msgs, in theory it
|
// Crazy idea: if peers had keypairs and could sign ops/msgs, in theory it
|
||||||
// would be safe to sync ops for friend A from friend B's cache, if he saved them,
|
// would be safe to sync ops for friend A from friend B's cache, if he saved them,
|
||||||
// which would mean you could get updates even if a peer was offline.
|
// which would mean you could get updates even if a peer was offline.
|
||||||
if ( cmd->source()->isLocal() )
|
if ( cmd->source()->isLocal() && !cmd->localOnly() )
|
||||||
{
|
{
|
||||||
// save to op-log
|
// save to op-log
|
||||||
DatabaseCommandLoggable* command = (DatabaseCommandLoggable*)cmd.data();
|
DatabaseCommandLoggable* command = (DatabaseCommandLoggable*)cmd.data();
|
||||||
|
Reference in New Issue
Block a user