pidgin: 137c7a7c: Dimmuxx noticed that retrieving OIM didn...

khc at pidgin.im khc at pidgin.im
Mon Sep 14 21:06:18 EDT 2009


-----------------------------------------------------------------
Revision: 137c7a7cf26f4bb4c81346009a2c7fb6c88f0024
Ancestor: bc64b5eb472500430bd789d326b144a0bfb808fa
Author: khc at pidgin.im
Date: 2009-09-15T01:04:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/137c7a7cf26f4bb4c81346009a2c7fb6c88f0024

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

ChangeLog: 

Dimmuxx noticed that retrieving OIM didn't work for him until he
signs off and back on, and that the faltcode is such:

<soap:Fault>
  <faultcode>AuthenticationFailed</faultcode>
  <faultstring>Authentication Failed</faultstring>
  <detail>
    <TweenerChallenge xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi">Passport1.4 blah blah blah blah</TweenerChallenge>
  </detail>
</soap:Fault>

and so he says, "I'm pretty sure just switching badcontexttoken or adding another else if will fix it :P"

As usual, ZERO amount of verification was done.

But don't we have a lot of users who offered to help except they can't code?
Hint hint hint.


-------------- next part --------------
============================================================
--- libpurple/protocols/msn/oim.c	eb18403341cf61d39b638119d39885bc5e64d6f7
+++ libpurple/protocols/msn/oim.c	8a9f9d40c54e09eaacc49c0dc048be5c59ce6497
@@ -172,8 +172,18 @@ msn_oim_request_cb(MsnSoapMessage *reque
 
 	if (faultcode) {
 		gchar *faultcode_str = xmlnode_get_data(faultcode);
+		gboolean need_token_update = FALSE;
 
-		if (faultcode_str && g_str_equal(faultcode_str, "q0:BadContextToken")) {
+		if (faultcode_str) {
+			if (g_str_equal(faultcode_str, "q0:BadContextToken") ||
+				g_str_equal(faultcode_str, "AuthenticationFailed"))
+				need_token_update = TRUE;
+			else if (g_str_equal(faultcode_str, "q0:AuthenticationFailed") &&
+				xmlnode_get_child(fault, "detail/RequiredAuthPolicy") != NULL)
+				need_token_update = TRUE;
+		}
+
+		if (need_token_update) {
 			purple_debug_warning("msn", "OIM Request Error, Updating token now.\n");
 			msn_nexus_update_token(data->oim->session->nexus,
 				data->send ? MSN_AUTH_LIVE_SECURE : MSN_AUTH_MESSENGER_WEB,
@@ -181,16 +191,8 @@ msn_oim_request_cb(MsnSoapMessage *reque
 			g_free(faultcode_str);
 			return;
 
-		} else if (faultcode_str && g_str_equal(faultcode_str, "q0:AuthenticationFailed")) {
-			if (xmlnode_get_child(fault, "detail/RequiredAuthPolicy") != NULL) {
-				purple_debug_warning("msn", "OIM Request Error, Updating token now.\n");
-				msn_nexus_update_token(data->oim->session->nexus,
-					data->send ? MSN_AUTH_LIVE_SECURE : MSN_AUTH_MESSENGER_WEB,
-					(GSourceFunc)msn_oim_request_helper, data);
-				g_free(faultcode_str);
-				return;
-			}
 		}
+
 		g_free(faultcode_str);
 	}
 


More information about the Commits mailing list