diff libpurple/protocols/msn/contact.c @ 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 23f6f80f45ed
children f7ba0e314fc8 cd022bd83677 767fd05c434d
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;