comparison src/protocols/jabber/roster.c @ 13807:a415805c7456

[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 <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Thu, 08 Jun 2006 04:27:04 +0000
parents af257d8679fe
children 60f39c405dff
comparison
equal deleted inserted replaced
13806:25e63008d3bb 13807:a415805c7456
19 * 19 *
20 */ 20 */
21 #include "internal.h" 21 #include "internal.h"
22 #include "debug.h" 22 #include "debug.h"
23 #include "server.h" 23 #include "server.h"
24 #include "util.h"
24 25
25 #include "buddy.h" 26 #include "buddy.h"
26 #include "presence.h" 27 #include "presence.h"
27 #include "roster.h" 28 #include "roster.h"
28 #include "iq.h" 29 #include "iq.h"
200 for(group = xmlnode_get_child(item, "group"); group; group = xmlnode_get_next_twin(group)) { 201 for(group = xmlnode_get_child(item, "group"); group; group = xmlnode_get_next_twin(group)) {
201 char *group_name; 202 char *group_name;
202 203
203 if(!(group_name = xmlnode_get_data(group))) 204 if(!(group_name = xmlnode_get_data(group)))
204 group_name = g_strdup(""); 205 group_name = g_strdup("");
205 groups = g_slist_append(groups, group_name); 206
207 if (g_slist_find_custom(groups, group_name, (GCompareFunc)gaim_utf8_strcasecmp) == NULL)
208 groups = g_slist_append(groups, group_name);
206 } 209 }
207 add_gaim_buddies_in_groups(js, jid, name, groups); 210 add_gaim_buddies_in_groups(js, jid, name, groups);
208 } 211 }
209 } 212 }
210 } 213 }