diff src/protocols/jabber/auth.c @ 7642:9008b5be4275

[gaim-migrate @ 8285] let the xmlnode stuff handle embedded NULLs (i'll need this later) committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 26 Nov 2003 17:28:13 +0000
parents 2df4d470c12a
children 4168b8881746
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c	Wed Nov 26 16:33:40 2003 +0000
+++ b/src/protocols/jabber/auth.c	Wed Nov 26 17:28:13 2003 +0000
@@ -46,7 +46,7 @@
 		if(gaim_account_get_bool(js->gc->account, "use_tls", TRUE) &&
 						gaim_ssl_is_supported()) {
 			jabber_send_raw(js,
-					"<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
+					"<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1);
 			return;
 		} else if(xmlnode_get_child(starttls, "required")) {
 			gaim_connection_error(js->gc, _("Server requires SSL for login"));
@@ -78,8 +78,9 @@
 	if(digest_md5) {
 		xmlnode_set_attrib(auth, "mechanism", "DIGEST-MD5");
 		js->auth_type = JABBER_AUTH_DIGEST_MD5;
-	/*
+		/*
 	} else if(plain) {
+		xmlnode_set_attrib(auth, "mechanism", "PLAIN");
 		js->auth_type = JABBER_AUTH_PLAIN;
 		*/
 	} else {
@@ -297,7 +298,8 @@
 			if(rspauth && js->expected_rspauth &&
 					!strcmp(rspauth, js->expected_rspauth)) {
 				jabber_send_raw(js,
-						"<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl' />");
+						"<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl' />",
+						-1);
 			} else {
 				gaim_connection_error(js->gc, _("Invalid challenge from server"));
 			}
@@ -358,7 +360,7 @@
 
 			buf = g_strdup_printf("<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>%s</response>", enc_out);
 
-			jabber_send_raw(js, buf);
+			jabber_send_raw(js, buf, -1);
 
 			g_free(buf);