Mercurial > pidgin
changeset 24865:fbfbebc9197e
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?
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 22 Dec 2008 22:01:34 +0000 |
parents | 01bd85f65fa1 |
children | 667b8ae0fcee |
files | libpurple/blist.c pidgin/gtkblist.c |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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);