comparison libpurple/protocols/oscar/oscar.c @ 31693:3fe2bd895946

There is code above these lines, just before the start of the switch(), that validates that curitem->name is utf8. So we don't need to bother with oscar_utf8_try_convert() here. I know there has been some concern in the past about some people having non-utf8 names in their server list and wanting Pidgin to deal with that intelligently... all I can say is this commit shouldn't change the current functionality. It looks like we currently ignore groups from the server list if they're non-utf8, and it looks like it's been that way since at least 2.7.3, and more likely before then.
author Mark Doliner <mark@kingant.net>
date Mon, 21 Feb 2011 09:28:03 +0000
parents b39a2bd81566
children 6b2b8cc8e7ae
comparison
equal deleted inserted replaced
31692:e5cd15ee3e5d 31693:3fe2bd895946
4049 g_free(alias_utf8); 4049 g_free(alias_utf8);
4050 } 4050 }
4051 } break; 4051 } break;
4052 4052
4053 case AIM_SSI_TYPE_GROUP: { /* Group */ 4053 case AIM_SSI_TYPE_GROUP: { /* Group */
4054 char *gname; 4054 if (curitem->name != NULL && purple_find_group(curitem->name) == NULL) {
4055 char *gname_utf8; 4055 g = purple_group_new(curitem->name);
4056
4057 gname = curitem->name;
4058 gname_utf8 = oscar_utf8_try_convert(account, od, gname);
4059
4060 if (gname_utf8 != NULL && purple_find_group(gname_utf8) == NULL) {
4061 g = purple_group_new(gname_utf8);
4062 purple_blist_add_group(g, NULL); 4056 purple_blist_add_group(g, NULL);
4063 } 4057 }
4064 g_free(gname_utf8);
4065 } break; 4058 } break;
4066 4059
4067 case AIM_SSI_TYPE_PERMIT: { /* Permit buddy (unless we're on ICQ) */ 4060 case AIM_SSI_TYPE_PERMIT: { /* Permit buddy (unless we're on ICQ) */
4068 if (!od->icq && curitem->name) { 4061 if (!od->icq && curitem->name) {
4069 for (cur = account->permit; (cur && oscar_util_name_compare(curitem->name, cur->data)); cur = cur->next); 4062 for (cur = account->permit; (cur && oscar_util_name_compare(curitem->name, cur->data)); cur = cur->next);