From 88273d6f7c2af64867715dfdadc98d8babbe8856 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Wed, 9 Nov 2005 09:06:42 +0000 Subject: Fixes 273322 svn path=/trunk/; revision=30582 --- calendar/gui/e-pub-utils.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-pub-utils.c b/calendar/gui/e-pub-utils.c index 7aad545314..ab39e13d81 100644 --- a/calendar/gui/e-pub-utils.c +++ b/calendar/gui/e-pub-utils.c @@ -191,7 +191,7 @@ e_pub_publish (gboolean publish) { uri_config_list = calendar_config_get_free_busy (); for (l = uri_config_list; l != NULL; l = l->next) { - GSList *p =NULL; + GSList *p =NULL, *q; EPublishUri *uri; ECalComponent *clone = NULL; gboolean cloned = FALSE; @@ -236,8 +236,9 @@ e_pub_publish (gboolean publish) { /* We still need to set the last_pub_time */ uri->last_pub_time = 0; is_publish_time (uri); - + q = NULL; for (p = uri->calendars; p != NULL; p = p->next) { + GList *comp_list = NULL; gchar *source_uid; ESource * source; @@ -247,12 +248,15 @@ e_pub_publish (gboolean publish) { source_uid = g_strdup (p->data); source = e_source_list_peek_source_by_uid (source_list, source_uid); + if (source) client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT); if (!client) { g_warning (G_STRLOC ": Could not publish Free/Busy: Calendar backend no longer exists"); g_free (source_uid); + g_free (p->data); + q = g_slist_append (q, p); continue; } @@ -263,6 +267,7 @@ e_pub_publish (gboolean publish) { error = NULL; g_object_unref (client); + client = NULL; g_free (source_uid); continue; } @@ -299,10 +304,16 @@ e_pub_publish (gboolean publish) { g_free (email); g_object_unref (client); + client = NULL; g_free (source_uid); } } + for(p = q; p!=NULL; p = p->next) { + uri->calendars = g_slist_delete_link (uri->calendars, p->data); + } + g_slist_free (q); + /* add password to the uri */ password = e_passwords_get_password ("Calendar", (gchar *)uri->location); -- cgit v1.2.3