X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-presets.c;h=6bddb7cba3d8831a6544a8a656ed5e0749596122;hp=86492087009a29002d7a063d139916d2d92a289a;hb=fbe3368c6b62a1f5582f69576b77807d504e9612;hpb=6c19d78bf76e50b7cafcca340104313a5879da5f diff --git a/src/modest-presets.c b/src/modest-presets.c index 8649208..6bddb7c 100644 --- a/src/modest-presets.c +++ b/src/modest-presets.c @@ -252,11 +252,13 @@ 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, "1") == 0) || (strcmp (val, "2") == 0))) { + if (val && strcmp (val, "1") == 0) { + protocol_type = MODEST_PROTOCOLS_CONNECTION_TLS; + } else if (val && strcmp (val, "2") == 0) { protocol_type = MODEST_PROTOCOLS_CONNECTION_SSL; } else if (val && (strcmp (val, "tls") == 0)) { protocol_type = MODEST_PROTOCOLS_CONNECTION_TLS; @@ -270,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)