Fix modest_tny_msg_header_get_all_recipients_list (in case from is empty)
[modest] / src / modest-presets.c
index 1bba4b6..7f9e790 100644 (file)
@@ -233,7 +233,7 @@ modest_presets_get_info_server_type (ModestPresets *self,
        g_free (val);
 
        /* debug: */
-/*     g_message ("provider id: %s, server type: %d", provider_id, info); */
+/*     g_debug ("provider id: %s, server type: %d", provider_id, info); */
        return protocol_type;
 }
 
@@ -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)