pidgin: 460353a5: The Yahoo prpl makes unnecessary callbac...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Aug 22 13:30:56 EDT 2010


----------------------------------------------------------------------
Revision: 460353a563acd73a6d210898ab721631c0ace443
Parent:   47179f04bde4a1cd3857fd05eb4e40f25ee9e26f
Author:   eion at robbmob.com
Date:     08/22/10 12:42:09
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/460353a563acd73a6d210898ab721631c0ace443

Changelog: 

The Yahoo prpl makes unnecessary callbacks to the Yahoo servers if the
buddy's alias is set to the same as their uid when initialising the buddy
list.  For large buddy lists, this can lock up computers as each callback
makes a seperate dns lookup and seperate http request.

This patch checks that the buddy's alias isn't the same as their uid
(something which seems to be fairly normal) before making the callback.
This speeds up initial logins to the Yahoo service.

Fixes #12532.

Changes against parent 47179f04bde4a1cd3857fd05eb4e40f25ee9e26f

  patched  libpurple/protocols/yahoo/yahoo_aliases.c

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo_aliases.c	ea162077f9f899b995a87f57d9d0bc73bae464a5
+++ libpurple/protocols/yahoo/yahoo_aliases.c	3316865023276e9f4298cbcd93c9433920cf014d
@@ -145,7 +145,7 @@ yahoo_fetch_aliases_cb(PurpleUtilFetchUr
 					if (alias != NULL) {
 						serv_got_alias(gc, yid, alias);
 						purple_debug_info("yahoo", "Fetched alias '%s' (%s)\n", alias, id);
-					} else if (buddy_alias != NULL && strcmp(buddy_alias, "") != 0) {
+					} else if (buddy_alias && *buddy_alias && !g_str_equal(buddy_alias, yid)) {
 					/* Or if we have an alias that Yahoo doesn't, send it up */
 						yahoo_update_alias(gc, yid, buddy_alias);
 						purple_debug_info("yahoo", "Sent updated alias '%s'\n", buddy_alias);


More information about the Commits mailing list