Mercurial > pidgin.yaz
changeset 20436:ad481ea028be
Fix msn_user_remove_group_id()
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 26 May 2007 17:14:25 +0000 |
parents | f0bc92602072 |
children | 8e722e947e00 |
files | libpurple/protocols/msn/user.c |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/user.c Sat May 26 15:44:48 2007 +0000 +++ b/libpurple/protocols/msn/user.c Sat May 26 17:14:25 2007 +0000 @@ -344,20 +344,26 @@ * TODO: we need to identify it via contact parse */ gboolean -msn_user_is_yahoo(PurpleAccount *account ,const char *name) +msn_user_is_yahoo(PurpleAccount *account, const char *name) { return (strstr(name,"yahoo") != NULL); } void -msn_user_remove_group_id(MsnUser *user, const char * id) +msn_user_remove_group_id(MsnUser *user, const char *id) { + GList *l; + g_return_if_fail(user != NULL); g_return_if_fail(id != NULL); - user->group_ids = g_list_remove(user->group_ids, id); - /* khc need to use g_list_find_custom here to find the right link */ - //g_free(id); + l = g_list_find_custom(user->group_ids, id, (GCompareFunc)strcmp); + + if (l == NULL) + return; + + g_free(l->data); + user->group_ids = g_list_remove_link(user->group_ids, l); } void