[evolution-patches] calendar patch for 309420



Hi,

Since Exchange can have multiple calendars, the key for remembering the
password, should be the same for a given account. This fixes this in
e-cal.c, whcih is needed as part of the fix for #309420.

Please let me know if this is fine to commit.

Thanks
-- Sarfraaz
Index: e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.110
diff -u -p -u -p -r1.110 e-cal.c
--- e-cal.c	17 Aug 2005 03:58:47 -0000	1.110
+++ e-cal.c	20 Aug 2005 11:42:22 -0000
@@ -1618,6 +1618,9 @@ open_calendar (ECal *ecal, gboolean only
 	/* see if the backend needs authentication */
 	if ( (priv->mode !=  CAL_MODE_LOCAL) && e_source_get_property (priv->source, "auth")) {
 		char *prompt, *key, *parent_source_url, *parent_user;
+		char *uri, *base_uri, *slash;
+		int base_uri_length;
+		ESourceGroup *es_grp;
 
 		priv->load_state = E_CAL_LOAD_AUTHENTICATING;
 
@@ -1650,7 +1653,16 @@ open_calendar (ECal *ecal, gboolean only
 			prompt = g_strdup_printf (_("Enter password for %s (user %s)"),
 					e_source_peek_name (priv->source), username);
 		}
-		key = e_source_get_uri (priv->source);
+		uri = e_source_get_uri (priv->source);
+
+		es_grp = e_source_peek_group (priv->source);
+		base_uri = e_source_group_peek_base_uri (es_grp);
+		if (base_uri) {
+			base_uri_length = strlen (base_uri);
+			slash = strchr (uri + base_uri_length, '/');
+			slash = '\0';
+		}
+		key = uri;
 		if (!key) {
 			e_calendar_remove_op (ecal, our_op);
 			g_mutex_unlock (our_op->mutex);


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