aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-account-editor.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2001-01-12 08:18:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-12 08:18:07 +0800
commitf7e2da3380627ffadd9af3755061fb5d3284f7f3 (patch)
tree68f4df21e59dd0c94b3f75a532ae55feb5cc63d2 /mail/mail-account-editor.c
parente86c8105a747ec3f96a5483d8e57686d5f5826e4 (diff)
downloadgsoc2013-evolution-f7e2da3380627ffadd9af3755061fb5d3284f7f3.tar
gsoc2013-evolution-f7e2da3380627ffadd9af3755061fb5d3284f7f3.tar.gz
gsoc2013-evolution-f7e2da3380627ffadd9af3755061fb5d3284f7f3.tar.bz2
gsoc2013-evolution-f7e2da3380627ffadd9af3755061fb5d3284f7f3.tar.lz
gsoc2013-evolution-f7e2da3380627ffadd9af3755061fb5d3284f7f3.tar.xz
gsoc2013-evolution-f7e2da3380627ffadd9af3755061fb5d3284f7f3.tar.zst
gsoc2013-evolution-f7e2da3380627ffadd9af3755061fb5d3284f7f3.zip
Eek! Don't destroy the account if the connection fails, duh. This is what
2001-01-11 Jeffrey Stedfast <fejj@helixcode.com> * 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
Diffstat (limited to 'mail/mail-account-editor.c')
-rw-r--r--mail/mail-account-editor.c16
1 files changed, 5 insertions, 11 deletions
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;
}