Index: evolution/plugins/publish-calendar/Makefile.am
===================================================================
--- evolution.orig/plugins/publish-calendar/Makefile.am
+++ evolution/plugins/publish-calendar/Makefile.am
@@ -11,6 +11,9 @@ plugin_DATA = 					\
 	publish-calendar.glade
 plugin_LTLIBRARIES = liborg-gnome-publish-calendar.la
 
+error_DATA = org-gnome-publish-calendar.error
+errordir = $(privdatadir)/errors
+
 liborg_gnome_publish_calendar_la_SOURCES =	\
 	publish-calendar.c			\
 	publish-format-fb.c			\
@@ -31,5 +34,6 @@ liborg_gnome_publish_calendar_la_LIBADD 
 
 EXTRA_DIST =					\
 	org-gnome-publish-calendar.eplug.xml	\
+	org-gnome-publish-calendar.error.xml	\
 	publish-calendar.glade			\
 	org-gnome-publish-calendar.xml
Index: evolution/plugins/publish-calendar/org-gnome-publish-calendar.error.xml
===================================================================
--- /dev/null
+++ evolution/plugins/publish-calendar/org-gnome-publish-calendar.error.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<error-list domain="org-gnome-publish-calendar">
+
+  <error id="create-uri-error" type="error">
+    <_primary>Could not create uri.</_primary>
+    <_secondary>{0} did not parse correctly.</_secondary>
+  </error>
+
+  <error id="vfs-open-error" type="error">
+    <_primary>Unable to open {0}.</_primary>
+    <_secondary>{1}</_secondary>
+  </error>
+
+  <error id="vfs-write-error" type="error">
+    <_primary>Write error while publishing calendar.</_primary>
+    <_secondary>{0}</_secondary>
+  </error>
+
+</error-list>
Index: evolution/plugins/publish-calendar/publish-calendar.c
===================================================================
--- evolution.orig/plugins/publish-calendar/publish-calendar.c
+++ evolution/plugins/publish-calendar/publish-calendar.c
@@ -31,6 +31,8 @@
 #include <calendar/gui/e-cal-menu.h>
 #include <shell/es-event.h>
 #include <e-util/e-util-private.h>
+#include <e-util/e-error.h>
+#include "publish-calendar.h"
 #include "url-editor-dialog.h"
 #include "publish-format-fb.h"
 #include "publish-format-ical.h"
@@ -79,20 +81,18 @@ publish (EPublishUri *uri)
 
 		vfs_uri = gnome_vfs_uri_new (uri->location);
 
-		password = e_passwords_get_password ("Calendar", uri->location);
-		gnome_vfs_uri_set_password (vfs_uri, password);
-
 		if (vfs_uri == NULL) {
-			fprintf (stderr, "Couldn't create uri %s\n", uri->location);
-			/* FIXME: EError */
+			e_error_new (NULL, ERROR_DOMAIN "create-uri-error", uri->location, NULL);
 			g_free (password);
 			return;
 		}
 
+		password = e_passwords_get_password ("Calendar", uri->location);
+		gnome_vfs_uri_set_password (vfs_uri, password);
+
 		result = gnome_vfs_create_uri (&handle, vfs_uri, GNOME_VFS_OPEN_WRITE, FALSE, 0666);
 		if (result != GNOME_VFS_OK) {
-			/* FIXME: EError */
-			fprintf (stderr, "Couldn't open %s: %s\n", uri->location, gnome_vfs_result_to_string (result));
+			e_error_new (NULL, ERROR_DOMAIN "vfs-open-error", uri->location, gnome_vfs_result_to_string (result), NULL);
 			g_free (password);
 			return;
 		}
Index: evolution/plugins/publish-calendar/publish-calendar.h
===================================================================
--- /dev/null
+++ evolution/plugins/publish-calendar/publish-calendar.h
@@ -0,0 +1,27 @@
+/*
+ * Authors: David Trowbridge <trowbrds@gmail.com>
+ *
+ * Copyright (C) 2006 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ */
+
+#ifndef PUBLISH_CALENDAR_H
+#define PUBLISH_CALENDAR_H
+
+#define ERROR_DOMAIN "org-gnome-publish-calendar:"
+
+#endif
Index: evolution/plugins/publish-calendar/publish-format-fb.c
===================================================================
--- evolution.orig/plugins/publish-calendar/publish-format-fb.c
+++ evolution/plugins/publish-calendar/publish-format-fb.c
@@ -28,7 +28,9 @@
 #include <libecal/e-cal.h>
 #include <libecal/e-cal-util.h>
 #include <libecal/e-cal-time-util.h>
+#include <e-util/e-error.h>
 #include <calendar/common/authentication.h>
+#include "publish-calendar.h"
 #include "publish-format-fb.h"
 
 static gboolean
@@ -36,11 +38,13 @@ write_calendar (gchar *uid, ESourceList 
 {
 	ESource *source;
 	ECal *client = NULL;
-	GError *error = NULL;
 	GList *objects;
+	GList *users = NULL;
 	icaltimezone *utc;
 	time_t start = time(NULL), end;
 	icalcomponent *top_level;
+	GError *error;
+	gchar *email;
 
 	utc = icaltimezone_get_utc_timezone ();
 	start = time_day_begin_with_zone (start, utc);
@@ -55,16 +59,24 @@ write_calendar (gchar *uid, ESourceList 
 	}
 
 	if (!e_cal_open (client, TRUE, &error)) {
-		/* FIXME: EError */
+		g_warning ("Could not open the calendar %s \n", error->message);
 		g_object_unref (client);
 		g_error_free (error);
 		return FALSE;
 	}
 
 	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_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;
+	}
+
+	if (e_cal_get_free_busy (client, users, start, end, &objects, NULL)) {
 		char *ical_string;
 		GnomeVFSFileSize bytes_written;
 		GnomeVFSResult result;
@@ -76,16 +88,20 @@ write_calendar (gchar *uid, ESourceList 
 			objects = g_list_remove (objects, comp);
 		}
 
+		if (users)
+			g_list_free (users);
+
 		ical_string = icalcomponent_as_ical_string (top_level);
 		if ((result = gnome_vfs_write (handle, (gconstpointer) ical_string, strlen (ical_string), &bytes_written)) != GNOME_VFS_OK) {
-			/* FIXME: EError */
+			e_error_new (NULL, ERROR_DOMAIN "vfs-write-error", gnome_vfs_result_to_string (result), NULL);
 			gnome_vfs_close (handle);
 			return FALSE;
 		}
 	} else {
-		/* FIXME: EError */
+		if (users)
+			g_list_free (users);
+
 		g_object_unref (client);
-		g_error_free (error);
 		return FALSE;
 	}
 
Index: evolution/plugins/publish-calendar/publish-format-ical.c
===================================================================
--- evolution.orig/plugins/publish-calendar/publish-format-ical.c
+++ evolution/plugins/publish-calendar/publish-format-ical.c
@@ -26,7 +26,9 @@
 #include <libedataserver/e-source-list.h>
 #include <libecal/e-cal.h>
 #include <libecal/e-cal-util.h>
+#include <e-util/e-error.h>
 #include <calendar/common/authentication.h>
+#include "publish-calendar.h"
 #include "publish-format-ical.h"
 
 static gboolean
@@ -47,7 +49,7 @@ write_calendar (gchar *uid, ESourceList 
 	}
 
 	if (!e_cal_open (client, TRUE, &error)) {
-		/* FIXME: EError */
+		g_warning("Could not open the calendar %s \n", error->message);
 		g_object_unref (client);
 		g_error_free (error);
 		return FALSE;
@@ -69,12 +71,11 @@ write_calendar (gchar *uid, ESourceList 
 
 		ical_string = icalcomponent_as_ical_string (top_level);
 		if ((result = gnome_vfs_write (handle, (gconstpointer) ical_string, strlen (ical_string), &bytes_written)) != GNOME_VFS_OK) {
-			/* FIXME: EError */
+			e_error_new (NULL, ERROR_DOMAIN "vfs-write-error", gnome_vfs_result_to_string (result), NULL);
 			gnome_vfs_close (handle);
 			return FALSE;
 		}
 	} else {
-		/* FIXME: EError */
 		g_object_unref (client);
 		g_error_free (error);
 		return FALSE;
Index: evolution/plugins/publish-calendar/ChangeLog
===================================================================
--- evolution.orig/plugins/publish-calendar/ChangeLog
+++ evolution/plugins/publish-calendar/ChangeLog
@@ -1,3 +1,15 @@
+2006-06-20  David Trowbridge <trowbrds@gmail.com>
+
+	Fixes #340783
+	* org-gnome-publish-calendar.error.xml: Add error definitions
+	* publish-calendar.c: (publish) Present errors to the user
+	* publish-calendar.h: Add header for error domain
+	* publish-format-fb.c: (write_calendar) Present errors to the user,
+	and pass list of users to e_cal_get_free_busy in order for
+	authenticated calendars to publish correctly.
+	* publish-format-ical.c: (write_calendar) Present errors to the user
+	* Makefile.am: Add references to EError definition file.
+
 2006-02-09  Rajeev ramanathan <rajeevramanathan_2004@yahoo.co.in>
 
 	Fixes #328389
