[evolution-patches] Exchange Connector - patch for remember password



Currently remember password is not working for Exchange connector.
Please review the patch for fixing the same.

Thanks,
Sushma.

Index: storage/exchange-account.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-account.c,v
retrieving revision 1.33
diff -u -p -r1.33 exchange-account.c
--- storage/exchange-account.c	21 Feb 2005 05:50:58 -0000	1.33
+++ storage/exchange-account.c	24 Feb 2005 15:14:57 -0000
@@ -846,28 +846,34 @@ get_password (ExchangeAccount *account, 
 
 	password = e_passwords_get_password ("Exchange", account->priv->password_key);
 
-	if (!password && exchange_component_is_interactive (global_exchange_component)) {
-		char *prompt;
+	if (exchange_component_is_interactive (global_exchange_component)) {
+		if (!password) {
+			char *prompt;
 
-		prompt = g_strdup_printf (_("%sEnter password for %s"),
-					  errmsg, account->account_name);
-		oldremember = remember = account->priv->account->source->save_passwd;
-		password = e_passwords_ask_password (
-			_("Enter password"),
-			"Exchange", account->priv->password_key,
-			prompt, E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
-			&remember, NULL);
-		if (remember != oldremember) {
-			account->priv->account->source->save_passwd = remember;
+			prompt = g_strdup_printf (_("%sEnter password for %s"),
+						  errmsg, account->account_name);
+			oldremember = remember = 
+					account->priv->account->source->save_passwd;
+			password = e_passwords_ask_password (
+					_("Enter password"),
+					"Exchange", 
+					account->priv->password_key,
+					prompt, 
+					E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
+					&remember, 
+					NULL);
+			if (remember != oldremember) {
+				account->priv->account->source->save_passwd = remember;
+			}
+			g_free (prompt);
+		} 
+		else if (password && !account->priv->account->source->save_passwd) {
+			/* get_password returns the password cached but user has not 
+		 	 * selected remember password option, forget this password 
+		 	 * whis is stored temporarily by e2k_validate_user() 
+		 	 */
+			e_passwords_forget_password ("Exchange", account->priv->password_key);
 		}
-		g_free (prompt);
-	} 
-	else if (password && !account->priv->account->source->save_passwd) {
-		/* get_password returns the password cached but user has not 
-		 * selected remember password option, forget this password 
-		 * whis is stored temporarily by e2k_validate_user() 
-		 */
-		e_passwords_forget_password ("Exchange", account->priv->password_key);
 	}
 
 	if (password) {
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.265
diff -u -r1.265 ChangeLog
--- ChangeLog	20 Feb 2005 06:57:46 -0000	1.265
+++ ChangeLog	24 Feb 2005 15:24:05 -0000
@@ -1,3 +1,9 @@
+2005-02-24  Sushma Rai  <rsushma novell com>
+
+	* storage/exchange-account.c (get_password): Forgetting temporarily 
+	stored password, once the exchange component is set to interactive.
+	Fixes remember password not working problem.
+
 2005-02-20  Sushma Rai <rsushma novell com>
 
 	* addressbook/e-book-backend-gal.c (func_is_or_begins_with): Allowing


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