From: <the...@us...> - 2006-08-03 09:17:08
|
Revision: 16626 Author: thekingant Date: 2006-08-03 02:17:05 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16626&view=rev Log Message: ----------- Hopefully load non-ASCII aliases from our SSI information correctly more often with AIM/ICQ. Mattias Eriksson helped with this patch Modified Paths: -------------- trunk/COPYRIGHT trunk/src/protocols/oscar/oscar.c Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2006-08-03 07:58:11 UTC (rev 16625) +++ trunk/COPYRIGHT 2006-08-03 09:17:05 UTC (rev 16626) @@ -86,6 +86,7 @@ Nelson Elhage Ignacio J. Elia Brian Enigma +Mattias Eriksson Stefan Esser Steffen Eschenbacher Marc Etcheverry Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-08-03 07:58:11 UTC (rev 16625) +++ trunk/src/protocols/oscar/oscar.c 2006-08-03 09:17:05 UTC (rev 16626) @@ -4786,7 +4786,18 @@ char *gname = aim_ssi_itemlist_findparentname(od->ssi.local, curitem->name); char *gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL; char *alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name); - char *alias_utf8 = alias ? oscar_utf8_try_convert(gc->account, alias) : NULL; + char *alias_utf8; + + if (alias != NULL) + { + if (g_utf8_validate(alias, -1, NULL)) + alias_utf8 = g_strdup(alias); + else + alias_utf8 = oscar_utf8_try_convert(account, alias); + } + else + alias_utf8 = NULL; + b = gaim_find_buddy(gc->account, curitem->name); /* Should gname be freed here? -- elb */ /* Not with the current code, but that might be cleaner -- med */ @@ -4946,8 +4957,18 @@ gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL; + alias = aim_ssi_getalias(od->ssi.local, gname, name); - alias_utf8 = alias ? oscar_utf8_try_convert(gc->account, alias) : NULL; + if (alias != NULL) + { + if (g_utf8_validate(alias, -1, NULL)) + alias_utf8 = g_strdup(alias); + else + alias_utf8 = oscar_utf8_try_convert(gaim_connection_get_account(gc), alias); + } + else + alias_utf8 = NULL; + b = gaim_find_buddy(gc->account, name); g_free(alias); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |