# HG changeset patch # User Ethan Blanton # Date 1149740824 0 # Node ID a415805c745625224224a898316c44dd6bdadb69 # Parent 25e63008d3bbf775cec57b17959fed04b3af0d9f [gaim-migrate @ 16232] Don Seiler submitted this patch to bug #1426339. It compensates for a jabber server error where some broken servers send more than one group name with a buddy. Or something like that. In any case, the server was broken and Gaim didn't handle it very gracefully, and it's a one-line fix. committer: Tailor Script diff -r 25e63008d3bb -r a415805c7456 src/protocols/jabber/roster.c --- a/src/protocols/jabber/roster.c Thu Jun 08 01:03:51 2006 +0000 +++ b/src/protocols/jabber/roster.c Thu Jun 08 04:27:04 2006 +0000 @@ -21,6 +21,7 @@ #include "internal.h" #include "debug.h" #include "server.h" +#include "util.h" #include "buddy.h" #include "presence.h" @@ -202,7 +203,9 @@ if(!(group_name = xmlnode_get_data(group))) group_name = g_strdup(""); - groups = g_slist_append(groups, group_name); + + if (g_slist_find_custom(groups, group_name, (GCompareFunc)gaim_utf8_strcasecmp) == NULL) + groups = g_slist_append(groups, group_name); } add_gaim_buddies_in_groups(js, jid, name, groups); }