2007-06-11 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Mon, 11 Jun 2007 16:50:17 +0000 (16:50 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Mon, 11 Jun 2007 16:50:17 +0000 (16:50 +0000)
* src/maemo/easysetup/modest-presets.c:
        (modest_presets_get_info_server_security): Do not report secure auth
        if there is none.
        * src/modest-protocol-info.c: Use the defines for the gconf key names
        for secure authentication. This was not working because we were writing
        Password and reading password, and the check was case sensitive.
        With this, gmail now works for receiving and sending when created via
        easysetup.

pmo-trunk-r2163

ChangeLog2
src/maemo/easysetup/modest-easysetup-wizard.c
src/maemo/easysetup/modest-presets.c
src/modest-protocol-info.c

index d98cb0e..6d28fed 100644 (file)
@@ -1,6 +1,17 @@
 2007-06-11  Murray Cumming  <murrayc@murrayc.com>
 
        * src/maemo/easysetup/modest-presets.c:
+       (modest_presets_get_info_server_security): Do not report secure auth 
+       if there is none.
+       * src/modest-protocol-info.c: Use the defines for the gconf key names 
+       for secure authentication. This was not working because we were writing 
+       Password and reading password, and the check was case sensitive.
+       With this, gmail now works for receiving and sending when created via 
+       easysetup.
+
+2007-06-11  Murray Cumming  <murrayc@murrayc.com>
+
+       * src/maemo/easysetup/modest-presets.c:
        (modest_presets_get_info_server_security): Correct the key name for 
        SecureSmtp, because it seems to be case-sensitive.
        * src/maemo/easysetup/modest-wizard-dialog.c: (create_title):
index 5495a43..7dd5fdd 100644 (file)
@@ -1517,15 +1517,19 @@ create_account (ModestEasysetupWizardDialog *self, gboolean enabled)
                ModestPresetsSecurity security_outgoing = 
                        modest_presets_get_info_server_security (priv->presets, provider_id, 
                                                                 FALSE /* incoming */);
-                       
+
+               /* TODO: There is no SMTP authentication enum for presets, 
+                  so we should probably check what the server supports. */
                protocol_security_outgoing = MODEST_PROTOCOL_CONNECTION_NORMAL;
                if (security_outgoing & MODEST_PRESETS_SECURITY_SECURE_SMTP) {
+                       /* printf("DEBUG: %s: using secure SMTP\n", __FUNCTION__); */
                        protocol_security_outgoing = MODEST_PROTOCOL_CONNECTION_SSL; /* TODO: Is this what we want? */
                        serverport_outgoing = 465;
                        protocol_authentication_outgoing = MODEST_PROTOCOL_AUTH_PASSWORD;
-               } else
+               } else {
+                       /* printf("DEBUG: %s: using non-secure SMTP\n", __FUNCTION__); */
                        protocol_authentication_outgoing = MODEST_PROTOCOL_AUTH_NONE;
-               /* TODO: There is no SMTP authentication enum for presets. */
+               }
        }
        else {
                /* Use custom pages because no preset was specified: */
index 7511dd1..d3c5553 100644 (file)
@@ -268,7 +268,6 @@ modest_presets_get_info_server_security (ModestPresets *self, const gchar *provi
                                             MODEST_PRESETS_KEY_OUTGOING, NULL);
                if (val) {
                        g_free (val);
-                       info |= MODEST_PRESETS_SECURITY_SECURE_SMTP;
                        
                        val = g_key_file_get_string (self->keyfile, provider_id,
                                                     MODEST_PRESETS_KEY_SECURE_SMTP, NULL);
index 503d15a..b0ce303 100644 (file)
@@ -31,6 +31,7 @@
 #include <string.h> /* strcmp */
 #include <modest-protocol-info.h>
 #include <modest-pair.h>
+#include <modest-defs.h>
 
 
 typedef struct {
@@ -60,9 +61,9 @@ static const ProtocolInfo ConnectionProtocolMap[] = {
 
 /* FIXME: these names must match those of tny_camel_account_get_supported_secure_auth */
 static const ProtocolInfo AuthProtocolMap[] = {
-       { MODEST_PROTOCOL_AUTH_NONE,          "none",     N_("None") },
-       { MODEST_PROTOCOL_AUTH_PASSWORD,      "Password", N_("Password") },
-       { MODEST_PROTOCOL_AUTH_CRAMMD5,       "cram-md5", N_("Cram MD5") }
+       { MODEST_PROTOCOL_AUTH_NONE,          MODEST_ACCOUNT_AUTH_MECH_VALUE_NONE,     N_("None") },
+       { MODEST_PROTOCOL_AUTH_PASSWORD,      MODEST_ACCOUNT_AUTH_MECH_VALUE_PASSWORD, N_("Password") },
+       { MODEST_PROTOCOL_AUTH_CRAMMD5,       MODEST_ACCOUNT_AUTH_MECH_VALUE_CRAMMD5, N_("Cram MD5") }
 };