[evolution-data-server] CamelSaslLogin: Use camel_service_get_password().



commit f58611a19037da0217f56e22e852b882318eca02
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Sep 25 18:30:26 2011 -0400

    CamelSaslLogin: Use camel_service_get_password().

 camel/camel-sasl-login.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-sasl-login.c b/camel/camel-sasl-login.c
index 333049b..d00ef07 100644
--- a/camel/camel-sasl-login.c
+++ b/camel/camel-sasl-login.c
@@ -62,13 +62,17 @@ sasl_login_challenge_sync (CamelSasl *sasl,
 	GByteArray *buf = NULL;
 	CamelService *service;
 	CamelURL *url;
+	const gchar *password;
 
 	priv = CAMEL_SASL_LOGIN (sasl)->priv;
 
 	service = camel_sasl_get_service (sasl);
 
 	url = camel_service_get_camel_url (service);
-	g_return_val_if_fail (url->passwd != NULL, NULL);
+	g_return_val_if_fail (url->user != NULL, NULL);
+
+	password = camel_service_get_password (service);
+	g_return_val_if_fail (password != NULL, NULL);
 
 	/* Need to wait for the server */
 	if (!token)
@@ -81,7 +85,7 @@ sasl_login_challenge_sync (CamelSasl *sasl,
 		break;
 	case LOGIN_PASSWD:
 		buf = g_byte_array_new ();
-		g_byte_array_append (buf, (guint8 *) url->passwd, strlen (url->passwd));
+		g_byte_array_append (buf, (guint8 *) password, strlen (password));
 
 		camel_sasl_set_authenticated (sasl, TRUE);
 		break;



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