From 6a68e6ae90e693e52306c0a9fef709fd628344f3 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Mon, 31 Jul 2006 09:23:24 +0000 Subject: Fixes #329740. svn path=/trunk/; revision=32445 --- plugins/publish-calendar/ChangeLog | 6 ++++++ plugins/publish-calendar/publish-format-fb.c | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'plugins/publish-calendar') diff --git a/plugins/publish-calendar/ChangeLog b/plugins/publish-calendar/ChangeLog index c4b9b86fc9..030f65cee3 100644 --- a/plugins/publish-calendar/ChangeLog +++ b/plugins/publish-calendar/ChangeLog @@ -1,3 +1,9 @@ +2006-07-31 Chenthill Palanisamy + + Fixes #329740 + * publish-format-fb.c: (write_calendar): Pass the email id + of the user for getting the free busy information. + 2006-07-31 Chenthill Palanisamy Fixes #347973 diff --git a/plugins/publish-calendar/publish-format-fb.c b/plugins/publish-calendar/publish-format-fb.c index 12aae23ebe..6069ccb490 100644 --- a/plugins/publish-calendar/publish-format-fb.c +++ b/plugins/publish-calendar/publish-format-fb.c @@ -41,6 +41,8 @@ write_calendar (gchar *uid, ESourceList *source_list, GnomeVFSHandle *handle) icaltimezone *utc; time_t start = time(NULL), end; icalcomponent *top_level; + char *email = NULL; + GList *users = NULL; utc = icaltimezone_get_utc_timezone (); start = time_day_begin_with_zone (start, utc); @@ -60,11 +62,16 @@ write_calendar (gchar *uid, ESourceList *source_list, GnomeVFSHandle *handle) g_error_free (error); return FALSE; } + + if (e_cal_get_cal_address (client, &email, &error)) { + if (email && *email) + users = g_list_append (users, email); + } top_level = e_cal_util_new_top_level (); error = NULL; - if (e_cal_get_free_busy (client, NULL, start, end, &objects, &error)) { + if (e_cal_get_free_busy (client, users, start, end, &objects, &error)) { char *ical_string; GnomeVFSFileSize bytes_written; GnomeVFSResult result; @@ -86,8 +93,17 @@ write_calendar (gchar *uid, ESourceList *source_list, GnomeVFSHandle *handle) /* FIXME: EError */ g_object_unref (client); g_error_free (error); + if (users) + g_list_free (users); + g_free (email); + return FALSE; } + + if (users) + g_list_free (users); + + g_free (email); g_object_unref (client); return TRUE; -- cgit v1.2.3