From 45ed58181fcf7e57cd76a2feb1ffe3f20dbeaca3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Villar=20Sen=C3=ADn?= Date: Mon, 4 May 2009 16:50:32 +0200 Subject: [PATCH] Set the new parsing for modest providers data * 0 -> None * 1 -> TLS * 2 -> SSL --- src/modest-presets.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/modest-presets.c b/src/modest-presets.c index 1bba4b6..6bddb7c 100644 --- a/src/modest-presets.c +++ b/src/modest-presets.c @@ -252,16 +252,14 @@ modest_presets_get_info_server_security (ModestPresets *self, const gchar *provi val = g_key_file_get_string (self->keyfile, provider_id, MODEST_PRESETS_KEY_INCOMING, NULL); if (val) { - g_free (val); + g_free (val); val = g_key_file_get_string (self->keyfile, provider_id, MODEST_PRESETS_KEY_INCOMING_SECURITY, NULL); - if (val && strcmp (val, "0") == 0) { + if (val && strcmp (val, "1") == 0) { protocol_type = MODEST_PROTOCOLS_CONNECTION_TLS; - } else if (val && strcmp (val, "1") == 0) { - protocol_type = MODEST_PROTOCOLS_CONNECTION_SSL; } else if (val && strcmp (val, "2") == 0) { - protocol_type = MODEST_PROTOCOLS_CONNECTION_NONE; + protocol_type = MODEST_PROTOCOLS_CONNECTION_SSL; } else if (val && (strcmp (val, "tls") == 0)) { protocol_type = MODEST_PROTOCOLS_CONNECTION_TLS; } else if (val && (strcmp (val, "ssl") == 0)) { @@ -274,10 +272,9 @@ modest_presets_get_info_server_security (ModestPresets *self, const gchar *provi MODEST_PRESETS_KEY_OUTGOING, NULL); if (val) { g_free (val); - + val = g_key_file_get_string (self->keyfile, provider_id, MODEST_PRESETS_KEY_SECURE_SMTP, NULL); - /* printf("debug: %s: provider_id=%s, secure-smtp val=%s\n", __FUNCTION__, provider_id, val); */ if (val && strcmp(val,"true") == 0) protocol_type = MODEST_PROTOCOLS_CONNECTION_SSL; else if (val && strcmp (val, "ssl") == 0) -- 1.7.9.5