? 329740.diff
? org-gnome-publish-calendar.error
? tt
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/publish-calendar/ChangeLog,v
retrieving revision 1.14
diff -u -p -r1.14 ChangeLog
--- ChangeLog	3 Mar 2006 13:46:52 -0000	1.14
+++ ChangeLog	12 Jun 2006 20:47:43 -0000
@@ -1,3 +1,9 @@
+2006-06-12  Chenthill Palanisamy  <pchenthill@novell.com>
+
+	Fixes #329740
+	* publish-format-fb.c: (write_calendar): Pass the email id
+	of the user for getting the free busy information.						 
+
 2006-02-09  Rajeev ramanathan <rajeevramanathan_2004@yahoo.co.in>
 
 	Fixes #328389
Index: publish-format-fb.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/publish-calendar/publish-format-fb.c,v
retrieving revision 1.2
diff -u -p -r1.2 publish-format-fb.c
--- publish-format-fb.c	27 Jan 2006 16:34:02 -0000	1.2
+++ publish-format-fb.c	12 Jun 2006 20:47:43 -0000
@@ -41,6 +41,8 @@ write_calendar (gchar *uid, ESourceList 
 	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,20 @@ write_calendar (gchar *uid, ESourceList 
 		g_error_free (error);
 		return FALSE;
 	}
+	
+	if (e_cal_get_cal_address (client, &email, &error)) {
+		if (email && *email)	
+			users = g_list_append (users, email);
+	} else {
+		g_warning ("Could not get the email: %s \n", error->message);
+		g_error_free (error);
+		error = NULL;
+	}
 
 	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 +97,17 @@ write_calendar (gchar *uid, ESourceList 
 		/* 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;
