From: Sergio Villar SenĂ­n Date: Mon, 4 May 2009 14:50:32 +0000 (+0200) Subject: Set the new parsing for modest providers data X-Git-Tag: 3.0.16-rc1~6 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=45ed58181fcf7e57cd76a2feb1ffe3f20dbeaca3 Set the new parsing for modest providers data * 0 -> None * 1 -> TLS * 2 -> SSL --- 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)