soc.2008.masterpassword: 12d8bc2b: Use purple_connection_get_password in SA...

qulogic at pidgin.im qulogic at pidgin.im
Mon Nov 7 02:37:19 EST 2011


----------------------------------------------------------------------
Revision: 12d8bc2b8e6870fab75ea22ee80cab75c57835a7
Parent:   0e1fcf743be5f14ef3cbf9c78253f4da3aa6f343
Author:   qulogic at pidgin.im
Date:     11/05/11 22:33:20
Branch:   im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/12d8bc2b8e6870fab75ea22ee80cab75c57835a7

Changelog: 

Use purple_connection_get_password in SASL stuff.

Changes against parent 0e1fcf743be5f14ef3cbf9c78253f4da3aa6f343

  patched  libpurple/protocols/jabber/auth_cyrus.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth_cyrus.c	fe95dddd0d1cf68a13229c93456be9c51e03a5c3
+++ libpurple/protocols/jabber/auth_cyrus.c	d334a4d03bff76d5ef2472ae200d271b2f595e07
@@ -91,12 +91,10 @@ static int jabber_sasl_cb_secret(sasl_co
 static int jabber_sasl_cb_secret(sasl_conn_t *conn, void *ctx, int id, sasl_secret_t **secret)
 {
 	JabberStream *js = ctx;
-	PurpleAccount *account;
 	const char *pw;
 	size_t len;
 
-	account = purple_connection_get_account(js->gc);
-	pw = purple_account_get_password(account);
+	pw = purple_connection_get_password(js->gc);
 
 	if (!conn || !secret || id != SASL_CB_PASS)
 		return SASL_BADPARAM;
@@ -231,7 +229,7 @@ jabber_auth_start_cyrus(JabberStream *js
 				 * to get one
 				 */
 
-				if (!purple_account_get_password(account)) {
+				if (!purple_connection_get_password(js->gc)) {
 					purple_account_request_password(account, G_CALLBACK(auth_pass_cb), G_CALLBACK(auth_no_pass_cb), js->gc);
 					return JABBER_SASL_STATE_CONTINUE;
 
@@ -352,7 +350,6 @@ jabber_sasl_build_callbacks(JabberStream
 static void
 jabber_sasl_build_callbacks(JabberStream *js)
 {
-	PurpleAccount *account;
 	int id;
 
 	/* Set up our callbacks structure */
@@ -375,8 +372,7 @@ jabber_sasl_build_callbacks(JabberStream
 	js->sasl_cb[id].context = (void *)js;
 	id++;
 
-	account = purple_connection_get_account(js->gc);
-	if (purple_account_get_password(account) != NULL ) {
+	if (purple_connection_get_password(js->gc) != NULL) {
 		js->sasl_cb[id].id = SASL_CB_PASS;
 		js->sasl_cb[id].proc = jabber_sasl_cb_secret;
 		js->sasl_cb[id].context = (void *)js;


More information about the Commits mailing list