summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-12-15 15:04:55 +0000
committerSushma Rai <rsushma@src.gnome.org>2005-12-15 15:04:55 +0000
commit8029be73c5869b0a5c15903819f92f8a8b562adb (patch)
tree0b0fcc5445b3910fb1af0455d7ad3a3484939e5a
parentca2673377d62c011917b16183b068f1906f79f71 (diff)
downloadevolution-data-server-8029be73c5869b0a5c15903819f92f8a8b562adb.tar.gz
Fixes the problem of validating and authenticating user only on pressing
"Authenticate" button twice, even if the user gives the proper password.
-rw-r--r--servers/exchange/ChangeLog6
-rw-r--r--servers/exchange/lib/e2k-autoconfig.c49
2 files changed, 31 insertions, 24 deletions
diff --git a/servers/exchange/ChangeLog b/servers/exchange/ChangeLog
index 778e97df4..e19378b8e 100644
--- a/servers/exchange/ChangeLog
+++ b/servers/exchange/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-15 Sushma Rai <rsushma@novell.com>
+
+ * lib/e2k-autoconfig.c (e2k_validate_user): Fixes the problem
+ of validating and authenticating user only on pressing "Authenticate"
+ button twice, even if the user gives the proper password.
+
2005-12-12 Irene Huang <Irene.Huang@sun.com>
* lib/e2k-autoconfig.c: (e2k_validate_user): If password
diff --git a/servers/exchange/lib/e2k-autoconfig.c b/servers/exchange/lib/e2k-autoconfig.c
index 9d15ca6be..af6b1159e 100644
--- a/servers/exchange/lib/e2k-autoconfig.c
+++ b/servers/exchange/lib/e2k-autoconfig.c
@@ -1577,34 +1577,35 @@ e2k_validate_user (const char *owa_url, char *user,
E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
&remember, NULL);
g_free (prompt);
- }
- else {
- valid = validate (owa_url, user, password, exchange_params, result);
- if (valid) {
- /* generate the proper key once the host name
- * is read and remember password temporarily,
- * so that at the end of * account creation,
- * user will not be prompted, for password will
- * not be asked again.
- */
-
- *remember_password = remember;
+ if (!password) {
g_free (key);
- if (exchange_params->is_ntlm)
- key = g_strdup_printf ("exchange://%s;auth=NTLM@%s/",
- user, exchange_params->host);
- else
- key = g_strdup_printf ("exchange://%s@%s/", user, exchange_params->host);
- e_passwords_add_password (key, password);
- e_passwords_remember_password ("Exchange", key);
- }
- else {
- /* if validation failed*/
- e_passwords_forget_password ("Exchange", key);
+ return valid;
}
}
- g_free (key);
+ valid = validate (owa_url, user, password, exchange_params, result);
+ if (valid) {
+ /* generate the proper key once the host name
+ * is read and remember password temporarily,
+ * so that at the end of * account creation,
+ * user will not be prompted, for password will
+ * not be asked again.
+ */
+ *remember_password = remember;
+ g_free (key);
+ if (exchange_params->is_ntlm)
+ key = g_strdup_printf ("exchange://%s;auth=NTLM@%s/",
+ user, exchange_params->host);
+ else
+ key = g_strdup_printf ("exchange://%s@%s/", user, exchange_params->host);
+ e_passwords_add_password (key, password);
+ e_passwords_remember_password ("Exchange", key);
+ }
+ else {
+ /* if validation failed*/
+ e_passwords_forget_password ("Exchange", key);
+ }
+ g_free (key);
return valid;
}