changeset 21137:8aee77a1b94d

merge of '3196ba6eba49b037cf62d9785fbc866b199321f3' and 'eee80ca106e368e47ea5c275a0a83dc8b24d0c54'
author Gary Kramlich <grim@reaperworld.com>
date Sun, 04 Nov 2007 18:45:12 +0000
parents 93e674197822 (diff) cb747d0f3457 (current diff)
children 3ee4d335247d
files
diffstat 1 files changed, 17 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c	Sun Nov 04 17:59:46 2007 +0000
+++ b/libpurple/protocols/msn/contact.c	Sun Nov 04 18:45:12 2007 +0000
@@ -100,46 +100,56 @@
 void
 msn_callback_state_set_who(MsnCallbackState *state, const gchar *who)
 {
+	gchar *nval;
 	g_return_if_fail(state != NULL);
 
+	nval = g_strdup(who);
 	g_free(state->who);
-	state->who = g_strdup(who);
+	state->who = nval;
 }
 
 void
 msn_callback_state_set_uid(MsnCallbackState *state, const gchar *uid)
 {
+	gchar *nval;
 	g_return_if_fail(state != NULL);
 
+	nval = g_strdup(uid);
 	g_free(state->uid);
-	state->uid = g_strdup(uid);
+	state->uid = nval;
 }
 
 void
 msn_callback_state_set_old_group_name(MsnCallbackState *state, const gchar *old_group_name)
 {
+	gchar *nval;
 	g_return_if_fail(state != NULL);
 
+	nval = g_strdup(old_group_name);
 	g_free(state->old_group_name);
-	state->old_group_name = g_strdup(old_group_name);
+	state->old_group_name = nval;
 }
 
 void
 msn_callback_state_set_new_group_name(MsnCallbackState *state, const gchar *new_group_name)
 {
+	gchar *nval;
 	g_return_if_fail(state != NULL);
 
+	nval = g_strdup(new_group_name);
 	g_free(state->new_group_name);
-	state->new_group_name = g_strdup(new_group_name);
+	state->new_group_name = nval;
 }
 
 void
 msn_callback_state_set_guid(MsnCallbackState *state, const gchar *guid)
 {
+	gchar *nval;
 	g_return_if_fail(state != NULL);
 
+	nval = g_strdup(guid);
 	g_free(state->guid);
-	state->guid = g_strdup(guid);
+	state->guid = nval;
 }
 
 
@@ -1074,6 +1084,7 @@
 				msn_user_unset_op(user, MSN_LIST_PL_OP);
 
 			msn_add_contact_to_list(session->contact, state, state->who, MSN_LIST_RL);
+			return;
 		} else if (state->list_id == MSN_LIST_AL) {
 			purple_privacy_permit_remove(session->account, state->who, TRUE);
 			msn_add_contact_to_list(session->contact, NULL, state->who, MSN_LIST_BL);
@@ -1191,7 +1202,7 @@
 
 	partner_scenario = (list == MSN_LIST_RL) ? MSN_PS_CONTACT_API : MSN_PS_BLOCK_UNBLOCK;
 
-	member = g_strdup_printf(MSN_MEMBER_PASSPORT_XML, passport);
+	member = g_strdup_printf(MSN_MEMBER_PASSPORT_XML, state->who);
 
 	body = g_strdup_printf(MSN_CONTACT_ADD_TO_LIST_TEMPLATE, 
 			       MsnSoapPartnerScenarioText[partner_scenario],