From 9ba4b08d37cb9370cb85b14113052c1b42f14385 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Tue, 8 Nov 2005 09:02:41 +0000 Subject: Modified the code in alarm_notify_add_calendars() to generate the correct key for obtaining the password for an authenticated calendar. svn path=/trunk/; revision=30579 --- calendar/ChangeLog | 7 +++++++ calendar/gui/alarm-notify/alarm-notify.c | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b9b457a4f6..4bab3a5ce8 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2005-11-08 P. S. Chakravarthi + + * gui/alarm-notify/alarm-notify.c + (alarm_notify_add_calendars): modified the code to + generate the correct key for obtaining the password + for an authenticated calendar. + 2005-11-08 P. S. Chakravarthi Fixes 319217 diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 5fa9117370..a74908bb2c 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -326,13 +326,18 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource { AlarmNotifyPrivate *priv; ECal *client; + EUri *e_uri; char *str_uri; + char *pass_key; g_return_if_fail (an != NULL); g_return_if_fail (IS_ALARM_NOTIFY (an)); - + /* Make sure the key used in for getting password is properly generated for all types of backends */ priv = an->priv; str_uri = e_source_get_uri (source); + e_uri = e_uri_new (str_uri); + pass_key = e_uri_to_string (e_uri, FALSE); + e_uri_free (e_uri); g_mutex_lock (an->priv->mutex); /* See if we already know about this uri */ @@ -345,9 +350,10 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource session skip this source loading. we do not really want to prompt for auth from alarm dameon*/ if ((e_source_get_property (source, "auth") && - (!e_passwords_get_password (e_source_get_property(source, "auth-domain"), str_uri)))) { + (!e_passwords_get_password (e_source_get_property(source, "auth-domain"), pass_key)))) { g_mutex_unlock (an->priv->mutex); g_free (str_uri); + g_free (pass_key); return; } client = auth_new_cal_from_source (source, source_type); @@ -357,6 +363,7 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource g_signal_connect (G_OBJECT (client), "cal_opened", G_CALLBACK (cal_opened_cb), an); e_cal_open_async (client, FALSE); } + g_free (pass_key); g_free (str_uri); g_mutex_unlock (an->priv->mutex); } -- cgit