pidgin.vv.yahoo.voice: 7a5124a7: Now it can at least log in...

malu at pidgin.im malu at pidgin.im
Sun Aug 22 17:20:31 EDT 2010


----------------------------------------------------------------------
Revision: 7a5124a7f049fccc354356cf685acc370f2c4c05
Parent:   0f8078f1f3eee758519e01cc8549f579cb58aa7e
Author:   malu at pidgin.im
Date:     08/22/10 17:18:59
Branch:   im.pidgin.pidgin.vv.yahoo.voice
URL: http://d.pidgin.im/viewmtn/revision/info/7a5124a7f049fccc354356cf685acc370f2c4c05

Changelog: 

Now it can at least log in...

Changes against parent 0f8078f1f3eee758519e01cc8549f579cb58aa7e

  patched  libpurple/protocols/yahoo/libymsg.c

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	2415e7dd8516080cae048f30b5a3df69e85aeb66
+++ libpurple/protocols/yahoo/libymsg.c	003512fa3431c34010fc0e5cbc796be3e0e9e96f
@@ -503,6 +503,8 @@ static void yahoo_process_list_15(Purple
 	char *temp = NULL;
 	YahooFriend *f = NULL; /* It's your friends. They're going to want you to share your StarBursts. */
 	                       /* But what if you had no friends? */
+	PurpleBuddy *b;
+	PurpleGroup *g;
 	YahooFederation fed = YAHOO_FEDERATION_NONE;
 	int stealth = 0;
 
@@ -548,9 +550,7 @@ static void yahoo_process_list_15(Purple
 				if (yd->current_list15_grp) {
 					/* This buddy is in a group */
 					f = yahoo_friend_find_or_new(gc, norm_bud);
-					if (!purple_find_buddy(account, norm_bud)) {
-						PurpleBuddy *b;
-						PurpleGroup *g;
+					if (!(b = purple_find_buddy(account, norm_bud))) {
 						if (!(g = purple_find_group(yd->current_list15_grp))) {
 							g = purple_group_new(yd->current_list15_grp);
 							purple_blist_add_group(g, NULL);
@@ -637,6 +637,8 @@ static void yahoo_process_list(PurpleCon
 	GSList *l = pkt->hash;
 	gboolean export = FALSE;
 	gboolean got_serv_list = FALSE;
+	PurpleBuddy *b;
+	PurpleGroup *g;
 	YahooFriend *f = NULL;
 	PurpleAccount *account = purple_connection_get_account(gc);
 	YahooData *yd = gc->proto_data;
@@ -704,9 +706,7 @@ static void yahoo_process_list(PurpleCon
 				norm_bud = g_strdup(purple_normalize(account, *bud));
 				f = yahoo_friend_find_or_new(gc, norm_bud);
 
-				if (!purple_find_buddy(account, norm_bud)) {
-					PurpleBuddy *b;
-					PurpleGroup *g;
+				if (!(b = purple_find_buddy(account, norm_bud))) {
 					if (!(g = purple_find_group(grp))) {
 						g = purple_group_new(grp);
 						purple_blist_add_group(g, NULL);
@@ -1877,7 +1877,7 @@ static void yahoo_auth16_stage2(PurpleUt
 					break;
 				default:
 					/* if we have everything we need, why not try to login irrespective of response */
-					if((yd->cookie_crumb != NULL) && (yd->cookie_y != NULL) && (yd->cookie_t != NULL)) {
+					if((crumb != NULL) && (yd->cookie_y != NULL) && (yd->cookie_t != NULL)) {
 						try_login_on_error = TRUE;
 						break;
 					}
@@ -1896,7 +1896,7 @@ static void yahoo_auth16_stage2(PurpleUt
 			}
 		}
 
-		crypt = g_strconcat(yd->cookie_crumb, auth_data->seed, NULL);
+		crypt = g_strconcat(crumb, auth_data->seed, NULL);
 		yahoo_auth16_stage3(gc, crypt);
 		g_free(crypt);
 		g_free(crumb);
@@ -3811,12 +3811,13 @@ const char *yahoo_list_emblem(PurpleBudd
 {
 	PurpleAccount *account;
 	PurpleConnection *gc;
+	YahooData *yd;
 	YahooFriend *f;
 	PurplePresence *presence;
 
 	if (!b || !(account = purple_buddy_get_account(b)) ||
 			!(gc = purple_account_get_connection(account)) ||
-			!gc->proto_data)
+			!(yd = gc->proto_data))
 		return NULL;
 
 	f = yahoo_friend_find(gc, purple_buddy_get_name(b));


More information about the Commits mailing list