Mercurial > pidgin
changeset 28957:452043d200f0
Replace guint membership_id[5] with guint member_id_on_pending_list in
MsnUser. We were only using this value for MSN_LIST_PL, so don't
bother storing it for other list types.
Saves the size of 4 pointers per MSN buddy.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 03 Feb 2010 22:19:11 +0000 |
parents | 36dff94b1b53 |
children | 3de19f8f5c92 |
files | libpurple/protocols/msn/contact.c libpurple/protocols/msn/user.h |
diffstat | 2 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c Wed Feb 03 22:02:46 2010 +0000 +++ b/libpurple/protocols/msn/contact.c Wed Feb 03 22:19:11 2010 +0000 @@ -406,8 +406,8 @@ msn_user_set_network(user, nid); msn_user_set_invite_message(user, invite); - if (member_id) { - user->membership_id[list] = atoi(member_id); + if (list == MSN_LIST_PL && member_id) { + user->member_id_on_pending_list = atoi(member_id); } msn_got_lst_user(session, user, 1 << list, NULL); @@ -1567,11 +1567,11 @@ if (user && user->networkid != MSN_NETWORK_PASSPORT) member = g_strdup_printf(MSN_MEMBER_MEMBERSHIPID_XML, "EmailMember", "Email", - user->membership_id[MSN_LIST_PL]); + user->member_id_on_pending_list); else member = g_strdup_printf(MSN_MEMBER_MEMBERSHIPID_XML, "PassportMember", "Passport", - user->membership_id[MSN_LIST_PL]); + user->member_id_on_pending_list); } else { /* list == MSN_LIST_AL || list == MSN_LIST_BL */ partner_scenario = MSN_PS_BLOCK_UNBLOCK;
--- a/libpurple/protocols/msn/user.h Wed Feb 03 22:02:46 2010 +0000 +++ b/libpurple/protocols/msn/user.h Wed Feb 03 22:19:11 2010 +0000 @@ -103,8 +103,11 @@ int list_op; /**< Which lists the user is in */ - guint membership_id[5]; /**< The membershipId sent by the contacts server, - indexed by the list it belongs to */ + /** + * The membershipId for this buddy on our pending list. Sent by + * the contact's server + */ + guint member_id_on_pending_list; char *invite_message; /**< Invite message of user request */ };