Mercurial > pidgin
diff src/protocols/jabber/jutil.c @ 7445:6ea4a49b4b51
[gaim-migrate @ 8052]
this should fix the case sensitivity issues for jabber. what made me think
that g_utf8_normalize() did anything with the strings of cases is beyond me.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Thu, 06 Nov 2003 07:07:22 +0000 |
parents | 58a426e1bd1a |
children | 9a6df4d567e0 |
line wrap: on
line diff
--- a/src/protocols/jabber/jutil.c Thu Nov 06 05:44:28 2003 +0000 +++ b/src/protocols/jabber/jutil.c Thu Nov 06 07:07:22 2003 +0000 @@ -274,21 +274,28 @@ JabberStream *js = gc ? gc->proto_data : NULL; static char buf[3072]; /* maximum legal length of a jabber jid */ JabberID *jid; + char *node, *domain; jid = jabber_id_new(in); if(!jid) return NULL; - if(js && jid->node && jid->resource && - jabber_chat_find(js, jid->node, jid->domain)) - g_snprintf(buf, sizeof(buf), "%s@%s/%s", jid->node, jid->domain, + node = jid->node ? g_utf8_strdown(jid->node, -1) : NULL; + domain = g_utf8_strdown(jid->domain, -1); + + + if(js && node && jid->resource && + jabber_chat_find(js, node, domain)) + g_snprintf(buf, sizeof(buf), "%s@%s/%s", node, domain, jid->resource); else - g_snprintf(buf, sizeof(buf), "%s%s%s", jid->node ? jid->node : "", - jid->node ? "@" : "", jid->domain); + g_snprintf(buf, sizeof(buf), "%s%s%s", node ? node : "", + node ? "@" : "", domain); jabber_id_free(jid); + g_free(node); + g_free(domain); return buf; }