[evolution-ews] EEwsBackend cleanups.



commit 44838b989ef098adf756a82b72feccdae739e2f6
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Jul 26 18:03:52 2012 -0400

    EEwsBackend cleanups.

 src/collection/e-ews-backend.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/collection/e-ews-backend.c b/src/collection/e-ews-backend.c
index c7a7e5c..a7fb93b 100644
--- a/src/collection/e-ews-backend.c
+++ b/src/collection/e-ews-backend.c
@@ -588,15 +588,18 @@ ews_backend_try_password_sync (ESourceAuthenticator *authenticator,
 	ESource *source;
 	ESourceCollection *collection_extension;
 	ESourceAuthenticationResult result;
-	CamelEwsSettings *settings;
+	CamelEwsSettings *ews_settings;
+	CamelNetworkSettings *network_settings;
 	GSList *folders_created = NULL;
 	GSList *folders_updated = NULL;
 	GSList *folders_deleted = NULL;
 	gboolean includes_last_folder = FALSE;
 	const gchar *extension_name;
+	gchar *auth_mech;
 	gchar *sync_state;
 	gchar *hosturl;
 	gchar *user;
+	guint timeout;
 	GError *local_error = NULL;
 
 	/* This tests the password by updating the folder hierarchy. */
@@ -604,8 +607,12 @@ ews_backend_try_password_sync (ESourceAuthenticator *authenticator,
 	backend = E_EWS_BACKEND (authenticator);
 	source = e_backend_get_source (E_BACKEND (backend));
 
-	settings = ews_backend_get_settings (backend);
-	hosturl = camel_ews_settings_dup_hosturl (settings);
+	ews_settings = ews_backend_get_settings (backend);
+	hosturl = camel_ews_settings_dup_hosturl (ews_settings);
+	timeout = camel_ews_settings_get_timeout (ews_settings);
+
+	network_settings = CAMEL_NETWORK_SETTINGS (ews_settings);
+	auth_mech = camel_network_settings_dup_auth_mechanism (network_settings);
 
 	extension_name = E_SOURCE_EXTENSION_COLLECTION;
 	collection_extension = e_source_get_extension (source, extension_name);
@@ -613,10 +620,9 @@ ews_backend_try_password_sync (ESourceAuthenticator *authenticator,
 
 	connection = e_ews_connection_new (
 		hosturl, user, password->str,
-		camel_network_settings_get_auth_mechanism (CAMEL_NETWORK_SETTINGS (settings)),
-		camel_ews_settings_get_timeout (settings),
-		NULL, NULL, error);
+		auth_mech, timeout, NULL, NULL, error);
 
+	g_free (auth_mech);
 	g_free (hosturl);
 	g_free (user);
 



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