pidgin: c4bb58a5: Fix two related bugs:

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Dec 22 17:08:27 EST 2008


-----------------------------------------------------------------
Revision: c4bb58a5faaffca6ba9149b9907ca082d284f82c
Ancestor: 8a7ddd4cbdac3a9819bed3b488b0fa1526888718
Author: markdoliner at pidgin.im
Date: 2008-12-22T22:01:34
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c4bb58a5faaffca6ba9149b9907ca082d284f82c

Modified files:
        libpurple/blist.c pidgin/gtkblist.c

ChangeLog: 

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?

-------------- next part --------------
============================================================
--- libpurple/blist.c	4e627c53cafca716623b20e2c337918ee225ee7c
+++ libpurple/blist.c	fa7ccb5d88f66b272a2664e86da870d6991381d2
@@ -1029,7 +1029,7 @@ void purple_blist_rename_group(PurpleGro
 		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;
 
============================================================
--- pidgin/gtkblist.c	ea17025dbcbd0b41e2f6aafb5f09d0734871890f
+++ pidgin/gtkblist.c	b6a4621559754b403c6fc4f9ed082378340714c3
@@ -602,7 +602,7 @@ static void gtk_blist_renderer_edited_cb
 			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);


More information about the Commits mailing list