diff src/protocols/jabber/auth.c @ 10740:94cc67130789

[gaim-migrate @ 12342] More big changes, yay. I combined gaim_connection_new and gaim_connection_connect. Earlier today I realized that it's dumb to have a GaimConnection that isn't connected. I'm about to combine gaim_connection_disconnect and gaim_connection_destroy, as well. I added a "password" field to GaimConnection. It holds the password used to login a specific GaimConnection. Now, when "remember password" is false, account->password is NEVER set. When the user tries to sign on and Gaim prompts for the password, it goes directly into the GaimConnection. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 26 Mar 2005 23:25:18 +0000
parents b256ce6b85b8
children 719779387f96
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c	Sat Mar 26 21:22:53 2005 +0000
+++ b/src/protocols/jabber/auth.c	Sat Mar 26 23:25:18 2005 +0000
@@ -74,7 +74,7 @@
 		response = g_string_append(response, js->user->node);
 		response = g_string_append_len(response, "\0", 1);
 		response = g_string_append(response,
-				gaim_account_get_password(js->gc->account));
+				gaim_connection_get_password(js->gc));
 
 		enc_out = gaim_base64_encode(response->str, response->len);
 
@@ -96,7 +96,7 @@
 		x = xmlnode_new_child(query, "resource");
 		xmlnode_insert_data(x, js->user->resource, -1);
 		x = xmlnode_new_child(query, "password");
-		xmlnode_insert_data(x, gaim_account_get_password(js->gc->account), -1);
+		xmlnode_insert_data(x, gaim_connection_get_password(js->gc), -1);
 		jabber_iq_set_callback(iq, auth_old_result_cb, NULL);
 		jabber_iq_send(iq);
 	}
@@ -201,7 +201,7 @@
 	JabberIq *iq;
 	xmlnode *query, *x;
 	const char *type = xmlnode_get_attrib(packet, "type");
-	const char *pw = gaim_account_get_password(js->gc->account);
+	const char *pw = gaim_connection_get_password(js->gc);
 
 	if(!type) {
 		gaim_connection_error(js->gc, _("Invalid response from server."));
@@ -422,12 +422,12 @@
 
 			a2 = g_strdup_printf("AUTHENTICATE:xmpp/%s", realm);
 			auth_resp = generate_response_value(js->user,
-					gaim_account_get_password(js->gc->account), nonce, cnonce, a2, realm);
+					gaim_connection_get_password(js->gc), nonce, cnonce, a2, realm);
 			g_free(a2);
 
 			a2 = g_strdup_printf(":xmpp/%s", realm);
 			js->expected_rspauth = generate_response_value(js->user,
-					gaim_account_get_password(js->gc->account), nonce, cnonce, a2, realm);
+					gaim_connection_get_password(js->gc), nonce, cnonce, a2, realm);
 			g_free(a2);