[evolution-exchange] Remember connection port from Authentication phase



commit c08494140c9dcc1bc6ffc32d64042813cd8f6925
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jun 11 19:04:24 2012 +0200

    Remember connection port from Authentication phase

 eplugin/exchange-account-setup.c |    4 ++++
 server/lib/e2k-autoconfig.c      |    3 +++
 server/lib/e2k-validate.h        |    1 +
 3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/eplugin/exchange-account-setup.c b/eplugin/exchange-account-setup.c
index 61cb85a..22174ed 100644
--- a/eplugin/exchange-account-setup.c
+++ b/eplugin/exchange-account-setup.c
@@ -450,6 +450,7 @@ owa_authenticate_user (GtkWidget *button,
 
 	exchange_params = g_new0 (ExchangeParams, 1);
 	exchange_params->host = NULL;
+	exchange_params->port = 0;
 	exchange_params->is_ntlm = TRUE;
 
 	settings = target_account->storage_settings;
@@ -506,6 +507,9 @@ owa_authenticate_user (GtkWidget *button,
 	camel_network_settings_set_host (
 		network_settings, valid ? exchange_params->host : "");
 
+	camel_network_settings_set_port (
+		network_settings, valid ? exchange_params->port : 0);
+
 	camel_network_settings_set_user (
 		network_settings, valid ? dup_user : "");
 
diff --git a/server/lib/e2k-autoconfig.c b/server/lib/e2k-autoconfig.c
index 5b0cd4f..116ed00 100644
--- a/server/lib/e2k-autoconfig.c
+++ b/server/lib/e2k-autoconfig.c
@@ -1537,6 +1537,7 @@ validate (const gchar *owa_url,
 	if (*result == E2K_AUTOCONFIG_OK) {
 		const gchar *mailbox;
 		gchar *owa_path;
+		guint port;
 		gint len;
 
 		*result = e2k_autoconfig_check_global_catalog (ac, &op);
@@ -1545,6 +1546,7 @@ validate (const gchar *owa_url,
 		/* find mailbox and owa_path values */
 		euri = e2k_uri_new (ac->home_uri);
 		path = g_strdup (euri->path + 1);
+		port = euri->port;
 		e2k_uri_free (euri);
 
 		/* no slash at the end of path */
@@ -1588,6 +1590,7 @@ validate (const gchar *owa_url,
 		g_free (path);
 
 		exchange_params->host = g_strdup (ac->pf_server);
+		exchange_params->port = port;
 		if (ac->gc_server != NULL)
 			camel_exchange_settings_set_gc_server_name (
 				exchange_params->settings, ac->gc_server);
diff --git a/server/lib/e2k-validate.h b/server/lib/e2k-validate.h
index 3618448..20ff66f 100644
--- a/server/lib/e2k-validate.h
+++ b/server/lib/e2k-validate.h
@@ -12,6 +12,7 @@ G_BEGIN_DECLS
 
 typedef struct {
 	gchar *host;
+	guint16 port;
 	CamelExchangeSettings *settings;
 	gboolean is_ntlm;
 } ExchangeParams;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]