evolution-data-server r8693 - in branches/gnome-2-22/calendar: . backends/groupwise



Author: abharath
Date: Tue Apr 29 07:01:36 2008
New Revision: 8693
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8693&view=rev

Log:
Committing on behalf of Chenthill Palanisamy  <pchenthill novell com>

2008-04-29  Chenthill Palanisamy  <pchenthill novell com>

        ** Fixes #358644 (bnc) 
        Retracted groupwise appointments should disappear as
        soon as they are retracted.


Modified:
   branches/gnome-2-22/calendar/ChangeLog
   branches/gnome-2-22/calendar/backends/groupwise/e-cal-backend-groupwise.c

Modified: branches/gnome-2-22/calendar/backends/groupwise/e-cal-backend-groupwise.c
==============================================================================
--- branches/gnome-2-22/calendar/backends/groupwise/e-cal-backend-groupwise.c	(original)
+++ branches/gnome-2-22/calendar/backends/groupwise/e-cal-backend-groupwise.c	Tue Apr 29 07:01:36 2008
@@ -114,7 +114,7 @@
 #define CURSOR_ITEM_LIMIT 100
 #define CURSOR_ICALID_LIMIT 500
 
-static guint get_cache_refresh_interval (void);
+static guint get_cache_refresh_interval (ECalBackendGroupwise *cbgw);
 
 EGwConnection *
 e_cal_backend_groupwise_get_connection (ECalBackendGroupwise *cbgw) {
@@ -455,7 +455,7 @@
 	current_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ());
 	gmtime_r (&current_time, &tm);
 
-	time_interval = get_cache_refresh_interval () / 60000;
+	time_interval = get_cache_refresh_interval (cbgw) / 60000;
 	
 	if (attempts) {
 		tm.tm_min += (time_interval * g_ascii_strtod (attempts, NULL));
@@ -651,17 +651,28 @@
 }
 
 static guint
-get_cache_refresh_interval (void)
+get_cache_refresh_interval (ECalBackendGroupwise *cbgw)
 {
 	guint time_interval;
 	const char *time_interval_string = NULL;
+	char *temp = NULL;
+	ECalBackend *backend = E_CAL_BACKEND (cbgw);
+	ESource *source;
 	
 	time_interval = CACHE_REFRESH_INTERVAL;
+	source = e_cal_backend_get_source (backend);
+	
 	time_interval_string = g_getenv ("GETQM_TIME_INTERVAL");
+	
+	if (!time_interval_string)
+		time_interval_string = temp = e_source_get_duped_property (source, "refresh");
+
 	if (time_interval_string) {
 		time_interval = g_ascii_strtod (time_interval_string, NULL);
 		time_interval *= (60*1000);
 	}
+
+	g_free (temp);
 		
 	return time_interval;
 }
@@ -685,7 +696,7 @@
 			break;
 
 		g_get_current_time (&timeout);
-		g_time_val_add (&timeout, get_cache_refresh_interval () * 1000);
+		g_time_val_add (&timeout, get_cache_refresh_interval (cbgw) * 1000);
 		g_cond_timed_wait (priv->dlock->cond, priv->dlock->mutex, &timeout);
 		
 		if (priv->dlock->exit) 
@@ -837,7 +848,7 @@
 			int time_interval;
 			char *utc_str;
 
-			time_interval = get_cache_refresh_interval ();
+			time_interval = get_cache_refresh_interval (cbgw);
 			utc_str = (char *) e_gw_connection_get_server_time (priv->cnc);
 			e_cal_backend_cache_set_marker (priv->cache);
 			e_cal_backend_cache_put_server_utc_time (priv->cache, utc_str);



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