adium.1-4: cfb61ee9: applied changes from c22043ed4b564d247db...

evands at pidgin.im evands at pidgin.im
Sun Sep 19 17:45:50 EDT 2010


----------------------------------------------------------------------
Revision: cfb61ee9a0d8f94d138e7a8b7c8455d3e0a4583b
Parent:   fa7af7557f09b92cf55a6a813fd980e7c25e1a7b
Author:   evands at pidgin.im
Date:     06/02/10 15:31:41
Branch:   im.pidgin.adium.1-4
URL: http://d.pidgin.im/viewmtn/revision/info/cfb61ee9a0d8f94d138e7a8b7c8455d3e0a4583b

Changelog: 

applied changes from c22043ed4b564d247db393d18a3de8df21981254
             through cfe0e649dda34d9252d40d8f67e445336a247998

applied changes from 9489c072c16eaf9f031955a64fc501f8c80bd61e
             through 52fb5cb4cd8795906a7313dd5edde763a4848a3e

Changes against parent fa7af7557f09b92cf55a6a813fd980e7c25e1a7b

  patched  libpurple/protocols/msn/slplink.c
  patched  libpurple/protocols/yahoo/libymsg.c

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	2cc57766405b7c5d3deba94b1c9c75dd046fdf34
+++ libpurple/protocols/yahoo/libymsg.c	d5d137654f47b77a4e301480a8e20624ef4f96ef
@@ -1783,23 +1783,17 @@ static gchar *yahoo_auth16_get_cookie_b(
 	return tmp2;
 }
 
-static void yahoo_auth16_stage2(PurpleUtilFetchUrlData *unused, gpointer user_data, const gchar *ret_data, size_t len, const gchar *error_message)
+static void yahoo_auth16_stage2(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *ret_data, size_t len, const gchar *error_message)
 {
 	struct yahoo_auth_data *auth_data = user_data;
 	PurpleConnection *gc = auth_data->gc;
-	YahooData *yd;
+	YahooData *yd = purple_connection_get_protocol_data(gc);
 	gboolean try_login_on_error = FALSE;
 
 	purple_debug_info("yahoo","Authentication: In yahoo_auth16_stage2\n");
 
-	if (!PURPLE_CONNECTION_IS_VALID(gc)) {
-		g_free(auth_data->seed);
-		g_free(auth_data);
-		g_return_if_reached();
-	}
-
-	yd = (YahooData *)gc->proto_data;
-
+	yd->url_datas = g_slist_remove(yd->url_datas, url_data);
+	
 	if (error_message != NULL) {
 		purple_debug_error("yahoo", "Login Failed, unable to retrieve stage 2 url: %s\n", error_message);
 		purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, error_message);
@@ -1905,18 +1899,15 @@ static void yahoo_auth16_stage2(PurpleUt
 	g_free(auth_data);
 }
 
-static void yahoo_auth16_stage1_cb(PurpleUtilFetchUrlData *unused, gpointer user_data, const gchar *ret_data, size_t len, const gchar *error_message)
+static void yahoo_auth16_stage1_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *ret_data, size_t len, const gchar *error_message)
 {
 	struct yahoo_auth_data *auth_data = user_data;
 	PurpleConnection *gc = auth_data->gc;
+	YahooData *yd = purple_connection_get_protocol_data(gc);
 
 	purple_debug_info("yahoo","Authentication: In yahoo_auth16_stage1_cb\n");
 
-	if (!PURPLE_CONNECTION_IS_VALID(gc)) {
-		g_free(auth_data->seed);
-		g_free(auth_data);
-		g_return_if_reached();
-	}
+	yd->url_datas = g_slist_remove(yd->url_datas, url_data);
 
 	if (error_message != NULL) {
 		purple_debug_error("yahoo", "Login Failed, unable to retrieve login url: %s\n", error_message);
@@ -2021,6 +2012,8 @@ static void yahoo_auth16_stage1_cb(Purpl
 			url_data = purple_util_fetch_url_request_len_with_account(
 					proxy_ssl ? account : NULL, url, TRUE, YAHOO_CLIENT_USERAGENT,
 					TRUE, NULL, TRUE, -1, yahoo_auth16_stage2, auth_data);
+			if (url_data)
+				yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
 			g_free(url);
 			g_free(token);
 		}
@@ -2029,6 +2022,7 @@ static void yahoo_auth16_stage1(PurpleCo
 
 static void yahoo_auth16_stage1(PurpleConnection *gc, const char *seed)
 {
+	YahooData *yd = purple_connection_get_protocol_data(gc);
 	PurpleAccount *account = purple_connection_get_account(gc);
 	PurpleUtilFetchUrlData *url_data = NULL;
 	struct yahoo_auth_data *auth_data = NULL;
@@ -2060,6 +2054,8 @@ static void yahoo_auth16_stage1(PurpleCo
 			proxy_ssl ? account : NULL, url, TRUE,
 			YAHOO_CLIENT_USERAGENT, TRUE, NULL, FALSE, -1,
 			yahoo_auth16_stage1_cb, auth_data);
+	if (url_data)
+		yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
 
 	g_free(url);
 }
@@ -3597,6 +3593,8 @@ static void yahoo_got_pager_server(Purpl
 	gchar **strings = NULL, *cs_server = NULL;
 	int port = 0, stringslen = 0;
 
+	yd->url_datas = g_slist_remove(yd->url_datas, url_data);
+
 	if(error_message != NULL || len == 0) {
 		purple_debug_error("yahoo", "Unable to retrieve server info. %"
 				G_GSIZE_FORMAT " bytes retrieved with error message: %s\n", len,
@@ -3643,6 +3641,7 @@ void yahoo_login(PurpleAccount *account)
 	YahooData *yd = gc->proto_data = g_new0(YahooData, 1);
 	PurpleStatus *status = purple_account_get_active_status(account);
 	gboolean use_whole_url = yahoo_account_use_http_proxy(gc);
+	PurpleUtilFetchUrlData *url_data;
 
 	gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC;
 
@@ -3675,12 +3674,14 @@ void yahoo_login(PurpleAccount *account)
 
 	/* Get the pager server.  Actually start connecting in the callback since we
 	 * must have the contents of the HTTP response to proceed. */
-	purple_util_fetch_url_request_len_with_account(
+	url_data = purple_util_fetch_url_request_len_with_account(
 			purple_connection_get_account(gc),
 			yd->jp ? YAHOOJP_PAGER_HOST_REQ_URL : YAHOO_PAGER_HOST_REQ_URL,
 			use_whole_url ? TRUE : FALSE,
 			YAHOO_CLIENT_USERAGENT, TRUE, NULL, FALSE, -1,
 			yahoo_got_pager_server, yd);
+	if (url_data)
+		yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
 
 	return;
 }
@@ -4369,6 +4370,8 @@ static void yahoo_get_sms_carrier_cb(Pur
 	PurpleAccount *account = purple_connection_get_account(gc);
 	PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, sms_cb_data->who, account);
 
+	yd->url_datas = g_slist_remove(yd->url_datas, url_data);
+
 	if (error_message != NULL) {
 		purple_conversation_write(conv, NULL, _("Can't send SMS. Unable to obtain mobile carrier."), PURPLE_MESSAGE_SYSTEM, time(NULL));
 
@@ -4462,7 +4465,9 @@ static void yahoo_get_sms_carrier(Purple
 	g_free(request);
 	g_free(validate_request_str);
 
-	if (!url_data) {
+	if (url_data)
+		yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
+	else {
 		PurpleAccount *account = purple_connection_get_account(gc);
 		PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, sms_cb_data->who, account);
 		purple_conversation_write(conv, NULL, _("Can't send SMS. Unable to obtain mobile carrier."), PURPLE_MESSAGE_SYSTEM, time(NULL));
============================================================
--- libpurple/protocols/msn/slplink.c	c73150501a8bbf5457e799d7bf8b2d6b1ecfd5bf
+++ libpurple/protocols/msn/slplink.c	2dd4620e4918023f07484e8b598431bf1af3498b
@@ -352,6 +352,7 @@ msn_slplink_release_slpmsg(MsnSlpLink *s
 msn_slplink_release_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg)
 {
 	MsnMessage *msg;
+	const char *passport;
 
 	slpmsg->msg = msg = msn_message_new_msnslp();
 
@@ -390,7 +391,8 @@ msn_slplink_release_slpmsg(MsnSlpLink *s
 
 	msg->msnslp_header.total_size = slpmsg->size;
 
-	msn_message_set_attr(msg, "P2P-Dest", slplink->remote_user);
+	passport = purple_normalize(slplink->session->account, slplink->remote_user);
+	msn_message_set_attr(msg, "P2P-Dest", passport);
 
 	msg->ack_cb = msg_ack;
 	msg->nak_cb = msg_nak;


More information about the Commits mailing list