Skip to content

Commit

Permalink
Do not update change number if db is clean
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Nov 14, 2017
1 parent fbe5284 commit d56b0ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/MPDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4354,6 +4354,13 @@ void MPDevice::setDataNode(const QString &service, const QByteArray &nodeData,
{
getChangeNumbers();
}
else
{
set_credentialsDbChangeNumber(0);
credentialsDbChangeNumberClone = 0;
set_dataDbChangeNumber(0);
dataDbChangeNumberClone = 0;
}
});

connect(jobs, &AsyncJobs::failed, [=](AsyncJob *failedJob)
Expand Down Expand Up @@ -6048,6 +6055,10 @@ void MPDevice::startIntegrityCheck(std::function<void(bool success, QString errs
/* Check loaded nodes, set bool to repair */
checkLoadedNodes(true, true, true);

/* set clone change number to actual, to prevent change number changes on device */
credentialsDbChangeNumberClone = get_credentialsDbChangeNumber();
dataDbChangeNumberClone = get_dataDbChangeNumber();

/* Generate save packets */
bool packets_generated = generateSavePackets(repairJobs, true, true, [](QVariantMap){});

Expand Down

0 comments on commit d56b0ba

Please sign in to comment.