cpw.qulogic.msn: 305bb636: Use the correct xmlnode when processing ...

qulogic at pidgin.im qulogic at pidgin.im
Sun Jun 15 21:55:45 EDT 2008


-----------------------------------------------------------------
Revision: 305bb636a4102d934e1a82e845a5b438e2372731
Ancestor: a66de00d99c134fa78249cb8a8db0c3bb1cc87a1
Author: qulogic at pidgin.im
Date: 2008-06-16T01:43:10
Branch: im.pidgin.cpw.qulogic.msn
URL: http://d.pidgin.im/viewmtn/revision/info/305bb636a4102d934e1a82e845a5b438e2372731

Modified files:
        libpurple/protocols/msn/soap2.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/soap2.c	548102f69e0048355f22918ad9279893e0afd16f
+++ libpurple/protocols/msn/soap2.c	a05ed086316fd6face9947b5a9545f4d23cc337b
@@ -224,7 +224,7 @@ msn_soap_handle_body(MsnSoapConnection *
 			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_handle_body(MsnSoapConnection *
 				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);


More information about the Commits mailing list