Mercurial > pidgin.yaz
changeset 14484:1f81919515ae
[gaim-migrate @ 17203]
Part of SF Patch #1554627 from Richard Nelson (wabz)
"The msn protocol currently calls serv_got_alias on all
buddy status changes (as they are NLN commands),
resulting in lots of unnecessary blist.xml write schedules.
serv_got_alias already checks if the alias has actually
changed before printing to the conv. The first hunk in
this patch checks it a bit earlier."
The second hunk checks in the MSN prpl, which also avoids
an extra call to msn_user_set_friendly_name().
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 09 Sep 2006 20:27:48 +0000 |
parents | af856551902b |
children | c02ef8dd4416 |
files | libgaim/protocols/msn/notification.c libgaim/server.c |
diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/protocols/msn/notification.c Sat Sep 09 19:41:34 2006 +0000 +++ b/libgaim/protocols/msn/notification.c Sat Sep 09 20:27:48 2006 +0000 @@ -664,7 +664,7 @@ MsnUser *user; MsnObject *msnobj; int clientid; - const char *state, *passport, *friendly; + const char *state, *passport, *friendly, *old_friendly; session = cmdproc->session; account = session->account; @@ -676,9 +676,12 @@ user = msn_userlist_find_user(session->userlist, passport); - serv_got_alias(gc, passport, friendly); - - msn_user_set_friendly_name(user, friendly); + old_friendly = msn_user_get_friendly_name(user); + if (old_friendly && strcmp(old_friendly, friendly)) + { + serv_got_alias(gc, passport, friendly); + msn_user_set_friendly_name(user, friendly); + } if (session->protocol_ver >= 9) {
--- a/libgaim/server.c Sat Sep 09 19:41:34 2006 +0000 +++ b/libgaim/server.c Sat Sep 09 20:27:48 2006 +0000 @@ -215,12 +215,13 @@ for (buds = buddies; buds; buds = buds->next) { b = buds->data; + if (b->server_alias && !strcmp(b->server_alias, alias)) + continue; gaim_blist_server_alias_buddy(b, alias); conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, account); - if (conv != NULL && b->server_alias != NULL && - strcmp(b->server_alias, alias)) + if (conv != NULL) { char *tmp = g_strdup_printf(_("%s is now known as %s.\n"), who, alias);