comparison libpurple/protocols/yahoo/libymsg.c @ 30640:3ae0814ae727

So it turns out the name vs oname thing wasn't a typo on Mark's part. I just misinterpreted it. Fix that and also avoid use of purple_normalize() in this function, because both places it's called already normalize strings before passing them in. No sense normalizing the same string twice.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sat, 19 Jun 2010 16:15:19 +0000
parents 490707649f29
children 81ffeb069847 06d8de5dd53c 0123c69ec0e5
comparison
equal deleted inserted replaced
30639:597840eccfa7 30640:3ae0814ae727
402 PurpleGroup *g; 402 PurpleGroup *g;
403 GSList *list, *i; 403 GSList *list, *i;
404 gboolean onlist = FALSE; 404 gboolean onlist = FALSE;
405 char *oname = NULL; 405 char *oname = NULL;
406 406
407 if (g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *)&oname, (gpointer *)&list)) 407 if (g_hash_table_lookup_extended(ht, name, (gpointer *)&oname, (gpointer *)&list))
408 g_hash_table_steal(ht, name); 408 g_hash_table_steal(ht, oname);
409 else 409 else
410 list = purple_find_buddies(account, name); 410 list = purple_find_buddies(account, name);
411 411
412 for (i = list; i; i = i->next) { 412 for (i = list; i; i = i->next) {
413 b = i->data; 413 b = i->data;
432 purple_blist_add_buddy(b, NULL, g, NULL); 432 purple_blist_add_buddy(b, NULL, g, NULL);
433 } 433 }
434 434
435 if (list) { 435 if (list) {
436 if (!oname) 436 if (!oname)
437 oname = g_strdup(purple_normalize(account, name)); 437 oname = g_strdup(name);
438 g_hash_table_insert(ht, oname, list); 438 g_hash_table_insert(ht, oname, list);
439 } else 439 } else
440 g_free(oname); 440 g_free(oname);
441 } 441 }
442 442