changeset 23482:314fcd0879ec

Use the correct xmlnode when processing SOAP Faults. When the MSN SOAP server sends a "psf:Redirect" Fault, look in the "Fault" node for the "redirectUrl", and not in the (possibly) non-existent "Body" node. This should fix login for @msn.com addresses, who seem to use a different login server. When we get a "wsse:FailedAuthentication" Fault, look in the "Fault" node for the "faultstring", instead of the "Body" node. Thanks, Dimmuxx.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 16 Jun 2008 01:43:10 +0000
parents 4cb1efafa410
children 63cfd4ea15ab
files libpurple/protocols/msn/soap2.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/soap2.c	Sun Jun 15 18:48:14 2008 +0000
+++ b/libpurple/protocols/msn/soap2.c	Mon Jun 16 01:43:10 2008 +0000
@@ -224,7 +224,7 @@
 			char *faultdata = xmlnode_get_data(faultcode);
 
 			if (g_str_equal(faultdata, "psf:Redirect")) {
-				xmlnode *url = xmlnode_get_child(body, "redirectUrl");
+				xmlnode *url = xmlnode_get_child(fault, "redirectUrl");
 
 				if (url) {
 					char *urldata = xmlnode_get_data(url);
@@ -236,7 +236,7 @@
 				msn_soap_message_destroy(response);
 				return TRUE;
 			} else if (g_str_equal(faultdata, "wsse:FailedAuthentication")) {
-				xmlnode *reason = xmlnode_get_child(body, "faultstring");
+				xmlnode *reason = xmlnode_get_child(fault, "faultstring");
 				char *reasondata = xmlnode_get_data(reason);
 
 				msn_soap_connection_sanitize(conn, TRUE);