[Commits] [SCM] claws branch, master, updated. 3.9.1-18-gd04fd18

colin at claws-mail.org colin at claws-mail.org
Thu May 30 11:36:39 CEST 2013


The branch master of project "claws" (Claws Mail) has been updated
       via  d04fd18b94a1c6fc8d22afe46367f278370011d3 (commit)
      from  533722f52efcce1117503d5263efbbd4702c9c09 (commit)


- Log -----------------------------------------------------------------
commit d04fd18b94a1c6fc8d22afe46367f278370011d3
Author: Colin Leroy <colin at colino.net>
Date:   Thu May 30 11:35:16 2013 +0200

    Reorder send_message's port selection logic, paving the
    way for bug #2252 "API for external password storage"
    Patch by Michal Gorny

diff --git a/src/send_message.c b/src/send_message.c
index e76794d..4e5f6e6 100644
--- a/src/send_message.c
+++ b/src/send_message.c
@@ -255,6 +255,34 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
 			smtp_session->hostname = NULL;
 		}
 
+#ifdef USE_GNUTLS
+		port = ac_prefs->set_smtpport ? ac_prefs->smtpport :
+			ac_prefs->ssl_smtp == SSL_TUNNEL ? SSMTP_PORT : SMTP_PORT;
+		session->ssl_type = ac_prefs->ssl_smtp;
+		if (ac_prefs->ssl_smtp != SSL_NONE)
+			session->nonblocking = ac_prefs->use_nonblocking_ssl;
+		if (ac_prefs->set_gnutls_priority && ac_prefs->gnutls_priority &&
+		    strlen(ac_prefs->gnutls_priority))
+			session->gnutls_priority = g_strdup(ac_prefs->gnutls_priority);
+#else
+		if (ac_prefs->ssl_smtp != SSL_NONE) {
+			if (alertpanel_full(_("Insecure connection"),
+				_("This connection is configured to be secured "
+				  "using SSL, but SSL is not available in this "
+				  "build of Claws Mail. \n\n"
+				  "Do you want to continue connecting to this "
+				  "server? The communication would not be "
+				  "secure."),
+				  GTK_STOCK_CANCEL, _("Con_tinue connecting"),
+				  NULL, FALSE, NULL, ALERT_WARNING,
+				  G_ALERTDEFAULT) != G_ALERTALTERNATE) {
+				session_destroy(session);
+				return -1;
+			}
+		}
+		port = ac_prefs->set_smtpport ? ac_prefs->smtpport : SMTP_PORT;
+#endif
+
 		if (ac_prefs->use_smtp_auth) {
 			smtp_session->forced_auth_type = ac_prefs->smtp_auth_type;
 			if (ac_prefs->smtp_userid && strlen(ac_prefs->smtp_userid)) {
@@ -294,34 +322,6 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
 			smtp_session->pass = NULL;
 		}
 
-#ifdef USE_GNUTLS
-		port = ac_prefs->set_smtpport ? ac_prefs->smtpport :
-			ac_prefs->ssl_smtp == SSL_TUNNEL ? SSMTP_PORT : SMTP_PORT;
-		session->ssl_type = ac_prefs->ssl_smtp;
-		if (ac_prefs->ssl_smtp != SSL_NONE)
-			session->nonblocking = ac_prefs->use_nonblocking_ssl;
-		if (ac_prefs->set_gnutls_priority && ac_prefs->gnutls_priority &&
-		    strlen(ac_prefs->gnutls_priority))
-			session->gnutls_priority = g_strdup(ac_prefs->gnutls_priority);
-#else
-		if (ac_prefs->ssl_smtp != SSL_NONE) {
-			if (alertpanel_full(_("Insecure connection"),
-				_("This connection is configured to be secured "
-				  "using SSL, but SSL is not available in this "
-				  "build of Claws Mail. \n\n"
-				  "Do you want to continue connecting to this "
-				  "server? The communication would not be "
-				  "secure."),
-				  GTK_STOCK_CANCEL, _("Con_tinue connecting"),
-				  NULL, FALSE, NULL, ALERT_WARNING,
-				  G_ALERTDEFAULT) != G_ALERTALTERNATE) {
-				session_destroy(session);
-				return -1;
-			}
-		}
-		port = ac_prefs->set_smtpport ? ac_prefs->smtpport : SMTP_PORT;
-#endif
-
 		send_dialog = send_progress_dialog_create();
 		send_dialog->session = session;
 		smtp_session->dialog = send_dialog;

-----------------------------------------------------------------------

Summary of changes:
 src/send_message.c |   56 ++++++++++++++++++++++++++--------------------------
 1 files changed, 28 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list