diff libpurple/protocols/yahoo/yahoo_aliases.c @ 30853:4ed390927f9d

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. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author eion@robbmob.com
date Sun, 22 Aug 2010 16:42:09 +0000
parents 908be3822215
children a8cc50c2279f
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_aliases.c	Thu Aug 19 19:55:31 2010 +0000
+++ b/libpurple/protocols/yahoo/yahoo_aliases.c	Sun Aug 22 16:42:09 2010 +0000
@@ -145,7 +145,7 @@
 					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);