[evolution-patches] Plugins: GroupWise:
- From: Sankarasivasubramanian P <psankar novell com>
- To: "evolution-patches lists ximian com" <evolution-patches lists ximian com>
- Subject: [evolution-patches] Plugins: GroupWise:
- Date: Wed, 27 Jul 2005 10:42:29 +0530
Hi,
When a GroupWise account is enabled, the password is asked twice. Once
for mailer and once for calendar/tasks/addrbook. The attached patch
fixes it. Please review.
Thanks,
Sankar
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-account-setup/ChangeLog,v
retrieving revision 1.18
diff -u -p -r1.18 ChangeLog
--- ChangeLog 23 Jul 2005 11:39:09 -0000 1.18
+++ ChangeLog 27 Jul 2005 04:50:38 -0000
@@ -1,3 +1,10 @@
+2005-07-27 Sankar P <psankar novell com>
+
+ * camel-gw-listener.c (get_addressbook_names_from_server) :
+ Added code to get the password from the cache, instead of asking the user twice.
+ and also freeing the password that was leaking before.
+ Fixes #310353
+
2005-07-23 Sushma Rai <rsushma novell com>
* camel-gw-listener.c (add_addressbook_sources): marking
Index: camel-gw-listener.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-account-setup/camel-gw-listener.c,v
retrieving revision 1.35
diff -u -p -r1.35 camel-gw-listener.c
--- camel-gw-listener.c 23 Jul 2005 11:39:09 -0000 1.35
+++ camel-gw-listener.c 27 Jul 2005 04:50:39 -0000
@@ -458,24 +458,30 @@ get_addressbook_names_from_server (char
failed_auth = "";
cnc = NULL;
- do {
- password_prompt = g_strdup_printf (_("Enter password for %s (user %s)"),
- poa_address, url->user);
- prompt = g_strconcat (failed_auth, password_prompt, NULL);
- g_free (password_prompt);
- password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
- E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember,
- NULL);
- g_free (prompt);
-
- if (!password)
- break;
+ do {
+ password = e_passwords_get_password ("Groupwise", key);
+ if (!password) {
+ password_prompt = g_strdup_printf (_("Enter password for %s (user %s)"),
+ poa_address, url->user);
+ prompt = g_strconcat (failed_auth, password_prompt, NULL);
+ g_free (password_prompt);
+ password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
+ E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember,
+ NULL);
+ g_free (prompt);
+
+ if (!password)
+ break;
+ }
cnc = e_gw_connection_new (uri, url->user, password);
if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) {
char *http_uri = g_strconcat ("http://", uri + 8, NULL);
cnc = e_gw_connection_new (http_uri, url->user, password);
g_free (http_uri);
}
+
+ g_free (password);
+
failed_auth = _("Failed to authenticate.\n");
flags |= E_PASSWORDS_REPROMPT;
} while (cnc == NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]