[evolution-kolab] KolabMailAccess: added server sync point when going online



commit 0057bfd918f6081510a6e7f189d602d7b251c594
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Aug 28 16:36:51 2012 +0200

    KolabMailAccess: added server sync point when going online
    
    * when switching from offline to online operational mode,
      do a full synchronization (all folders) with the server

 src/libekolab/kolab-mail-access.c |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/libekolab/kolab-mail-access.c b/src/libekolab/kolab-mail-access.c
index 8e886b7..dece45a 100644
--- a/src/libekolab/kolab-mail-access.c
+++ b/src/libekolab/kolab-mail-access.c
@@ -1236,12 +1236,24 @@ mail_access_strans_offline_online (KolabMailAccess *self,
 	}
 
 	/* Up to 3.4, we've been synchronizing folder metadata and
-	 * PIM payload data with the Kolab server here. This is now
-	 * being done in a separate synchronization function, which
+	 * PIM payload data with the Kolab server here. This can now
+	 * be done in a separate synchronization function, which
 	 * can be called upon per user request or at any place internally
 	 * where it seems fit (e.g. when switching views - but beware,
-	 * that operation can become quite bulky and time consuming)
+	 * that operation can become quite bulky and time consuming).
+	 * Until we get a synchronize() backend API function, we will
+	 * put a sync point here to mimick the previous behaviour.
 	 */
+	ok = mail_access_sync_with_server (self,
+	                                   KOLAB_MAIL_ACCESS_OPMODE_ONLINE,
+	                                   NULL, /* all folders */
+	                                   TRUE, /* full sync   */
+	                                   cancellable,
+	                                   &tmp_err);
+	if (! ok) {
+		g_propagate_error (err, tmp_err);
+		return FALSE;
+	}
 
 	g_debug ("KolabMailAccess: new state: online");
 	priv->state->opmode = KOLAB_MAIL_ACCESS_OPMODE_ONLINE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]