Mercurial > pidgin
changeset 21134:abc18354ef66
fix allowing to be added, some old fix was lost during one of the merges
that I did
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sun, 04 Nov 2007 04:41:09 +0000 |
parents | 4ea59c6e57cd |
children | 848e8bb7c975 |
files | libpurple/protocols/msn/contact.c |
diffstat | 1 files changed, 17 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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],