# HG changeset patch # User Mark Doliner # Date 1229983294 0 # Node ID fbfbebc9197e63674a3d40c655ec893481f76a68 # Parent 01bd85f65fa1d30c189976605384fced647230e6 Fix two related bugs: 1. When renaming a group and only changing capitalization, Pidgin prompted you "You are about to merge "Some Group" and "some group" 2. When renaming a group and only changing capitalization, libpurple got into an infinite loop because the dest and source groups were the same, and it tried to add buddies to itself until itself was empty. This resulted in increasing memory and 100% CPU utilization until the process was killed. Did we recently change purple_find_group() to be case insensitive or something? diff -r 01bd85f65fa1 -r fbfbebc9197e libpurple/blist.c --- a/libpurple/blist.c Mon Dec 22 19:29:59 2008 +0000 +++ b/libpurple/blist.c Mon Dec 22 22:01:34 2008 +0000 @@ -1029,7 +1029,7 @@ return; dest = purple_find_group(new_name); - if (dest != NULL) { + if (dest != NULL && purple_utf8_strcasecmp(source->name, dest->name) != 0) { /* We're merging two groups */ PurpleBlistNode *prev, *child, *next; diff -r 01bd85f65fa1 -r fbfbebc9197e pidgin/gtkblist.c --- a/pidgin/gtkblist.c Mon Dec 22 19:29:59 2008 +0000 +++ b/pidgin/gtkblist.c Mon Dec 22 22:01:34 2008 +0000 @@ -602,7 +602,7 @@ break; case PURPLE_BLIST_GROUP_NODE: dest = purple_find_group(arg2); - if (dest != NULL && strcmp(arg2, ((PurpleGroup*) node)->name)) { + if (dest != NULL && purple_utf8_strcasecmp(arg2, ((PurpleGroup*) node)->name)) { pidgin_dialogs_merge_groups((PurpleGroup*) node, arg2); } else purple_blist_rename_group((PurpleGroup*)node, arg2);