Bug 56667 - auto sync runs only once
Summary: auto sync runs only once
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: SyncEvolution (show other bugs)
Version: 1.3
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Patrick Ohly
QA Contact:
Whiteboard: 13x
Depends on:
Reported: 2012-11-02 09:20 UTC by Daniel
Modified: 2012-11-19 08:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Daniel 2012-11-02 09:20:53 UTC
Until version 1.2 auto sync happens every 30 minutes. Since 1.3 it happens only once after login. This is also the case in 1.3.1.

The process syncevo-dbus-server is started, but after the first sync it does not do any more. I have to sync manually.

Ubuntu 10.04 32-Bit.
Comment 1 Patrick Ohly 2012-11-04 16:17:07 UTC
I can reproduce this and wrote an automated test for it. I had tests for corner-cases, but not the key aspect of automated sycning :-/

The fix is a trivial one-line change, but requires a recompilation. I'll see when I can release 1.3.2.

commit 44fbf546456a0ca26d59b09e122ef8162263f4a8
Author: Patrick Ohly <patrick.ohly@intel.com>
Date:   Sun Nov 4 17:08:22 2012 +0100

    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.

diff --git a/src/dbus/server/auto-sync-manager.cpp b/src/dbus/server/auto-sync-manager.cpp
index b409c1e..0cb3c9a 100644
--- a/src/dbus/server/auto-sync-manager.cpp
+++ b/src/dbus/server/auto-sync-manager.cpp
@@ -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",
Comment 2 Daniel 2012-11-05 14:48:06 UTC
Thank you for the fix. I can apply it and compile it for me.
Comment 3 Patrick Ohly 2012-11-19 08:34:15 UTC
Will be in 1.3.2.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.