From f7e2da3380627ffadd9af3755061fb5d3284f7f3 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 12 Jan 2001 00:18:07 +0000 Subject: Eek! Don't destroy the account if the connection fails, duh. This is what 2001-01-11 Jeffrey Stedfast * mail-account-editor.c (apply_changes): Eek! Don't destroy the account if the connection fails, duh. This is what is causing the segfaults. svn path=/trunk/; revision=7421 --- mail/ChangeLog | 8 +++++++- mail/mail-account-editor.c | 16 +++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 5f9a158d19..6f9901fcbc 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-01-11 Jeffrey Stedfast + + * mail-account-editor.c (apply_changes): Eek! Don't destroy the + account if the connection fails, duh. This is what is causing the + segfaults. + 2001-01-11 Dan Winship * folder-browser.c (got_folder): Connect to folder_changed as well @@ -7,7 +13,7 @@ * GNOME_Evolution_Mail.oafinfo: Add Bonobo/ItemContainer as the set of supported interfaces in GNOME_Evolution_Mail_Composer - component. + component. 2001-01-11 Dan Winship diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c index c4ae08265a..6336bc5635 100644 --- a/mail/mail-account-editor.c +++ b/mail/mail-account-editor.c @@ -166,22 +166,17 @@ apply_changes (MailAccountEditor *editor) /* check to make sure the source works */ if (!mail_config_check_service (url, CAMEL_PROVIDER_STORE, NULL)) { camel_url_free (url); - account_destroy (account); return FALSE; } + g_free (account->source->url); + account->source->url = camel_url_to_string (url, FALSE); + if (account->source->save_passwd) { - char *string; - - string = camel_url_to_string (url, FALSE); - mail_session_set_password (string, url->passwd); - mail_session_remember_password (string); - g_free (string); + mail_session_set_password (account->source->url, url->passwd); + mail_session_remember_password (account->source->url); } - /* now that we know this url works, set it */ - g_free (account->source->url); - account->source->url = camel_url_to_string (url, FALSE); camel_url_free (url); /* transport */ @@ -205,7 +200,6 @@ apply_changes (MailAccountEditor *editor) /* check to make sure the transport works */ if (!mail_config_check_service (url, CAMEL_PROVIDER_TRANSPORT, NULL)) { camel_url_free (url); - account_destroy (account); return FALSE; } -- cgit v1.2.3