# HG changeset patch # User Ka-Hing Cheung # Date 1194151269 0 # Node ID abc18354ef665c64dcf32bac9eed94e42430d0be # Parent 4ea59c6e57cd7d82e45d648d2957f73b1ca723e1 fix allowing to be added, some old fix was lost during one of the merges that I did diff -r 4ea59c6e57cd -r abc18354ef66 libpurple/protocols/msn/contact.c --- a/libpurple/protocols/msn/contact.c Sat Nov 03 20:55:15 2007 +0000 +++ b/libpurple/protocols/msn/contact.c Sun Nov 04 04:41:09 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],