im.pidgin.pidgin: a015c467cccef82f3afcf2f76a7449bba616944b

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Jan 31 18:30:57 EST 2008


-----------------------------------------------------------------
Revision: a015c467cccef82f3afcf2f76a7449bba616944b
Ancestor: e913e51190caad8e02a0b25da47165235141723e
Author: markdoliner at pidgin.im
Date: 2008-01-31T23:27:59
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/yahoo/yahoo.c

ChangeLog: 

Use the group passed into yahoo_add_buddy() instead of looking
it up ourselves.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c	2df3c54d659318c26480fcc04a9fc0a664636551
+++ libpurple/protocols/yahoo/yahoo.c	82c9ea2d00c06bc1b33c790de2f7c7e85419886e
@@ -3848,12 +3848,10 @@ static void yahoo_keepalive(PurpleConnec
 	yahoo_packet_send_and_free(pkt, yd);
 }
 
-/* XXX - What's the deal with PurpleGroup *foo? */
-static void yahoo_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *foo)
+static void yahoo_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *g)
 {
 	struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
 	struct yahoo_packet *pkt;
-	PurpleGroup *g;
 	const char *group = NULL;
 	char *group2;
 	YahooFriend *f;
@@ -3867,15 +3865,11 @@ static void yahoo_add_buddy(PurpleConnec
 
 	f = yahoo_friend_find(gc, purple_buddy_get_name(buddy));
 
-	if (foo)
-		group = foo->name;
-	if (!group) {
-		g = purple_buddy_get_group(buddy);
-		if (g)
-			group = g->name;
-		else
-			group = "Buddies";
-	}
+	g = purple_buddy_get_group(buddy);
+	if (g)
+		group = g->name;
+	else
+		group = "Buddies";
 
 	group2 = yahoo_string_encode(gc, group, NULL);
 	pkt = yahoo_packet_new(YAHOO_SERVICE_ADDBUDDY, YAHOO_STATUS_AVAILABLE, 0);


More information about the Commits mailing list