auto sync: only synced once (FDO #56667)

A successful sync was incorrectly treated like a sync with a permanent
failure, which prevents further automatic syncing.

Adding a check for "status okay" fixes that problem. A unit test for
this case will be comitted separately.
This commit is contained in:
Patrick Ohly 2012-11-04 17:08:22 +01:00
parent 547aa46fc5
commit d4b85f9c62

View file

@ -507,7 +507,7 @@ void AutoSyncManager::autoSyncDone(AutoSyncTask *task, SyncMLStatus status)
void AutoSyncManager::anySyncDone(AutoSyncTask *task, SyncMLStatus status)
{
// set "permanently failed" flag according to most recent result
task->m_permanentFailure = !ErrorIsTemporary(status);
task->m_permanentFailure = status != STATUS_OK && !ErrorIsTemporary(status);
SE_LOG_DEBUG(NULL, NULL, "auto sync: sync session %s done, result %d %s",
task->m_configName.c_str(),
status,