[evolution/gnome-2-32] Bug #634385 - Crash in smtp_connect



commit e91dcae7c683d65b5789a79161f1998f43a2b425
Author: Milan Crha <mcrha redhat com>
Date:   Wed Dec 15 16:03:00 2010 +0100

    Bug #634385 - Crash in smtp_connect

 mail/mail-ops.c     |    6 +++++-
 mail/mail-session.c |    6 ++++++
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 7f84b3b..9fa7671 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -495,9 +495,13 @@ mail_send_message (struct _send_queue_msg *m,
 		if ((account = e_get_account_by_uid (name))
 		    /* 'old' x-evolution-account stored the name, how silly */
 		    || (account = e_get_account_by_name (name))) {
-			if (account->transport && account->transport->url)
+			if (account->transport && account->transport->url) {
 				transport_url = g_strdup (account->transport->url);
 
+				/* to reprompt password on sending if needed */
+				account->transport->get_password_canceled = FALSE;
+			}
+
 			sent_folder_uri = g_strdup (account->sent_folder_uri);
 		}
 		g_free(name);
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 4e4850b..80f2c78 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -207,6 +207,9 @@ get_password (CamelSession *session,
 		if (ret == NULL || (flags & CAMEL_SESSION_PASSWORD_REPROMPT)) {
 			gboolean remember;
 
+			g_free (ret);
+			ret = NULL;
+
 			if (url) {
 				if  ((account = mail_config_get_account_by_source_url(url)))
 					config_service = account->source;
@@ -255,6 +258,9 @@ get_password (CamelSession *session,
 
 				ret = e_passwords_ask_password(title, domain, key, prompt, eflags, &remember, NULL);
 
+				if (!ret)
+					e_passwords_forget_password (domain, key);
+
 				g_free(title);
 
 				if (ret && config_service)



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