# HG changeset patch # User Marcus Lundblad # Date 1259703415 0 # Node ID cfcf5076b73f9850455cd082cabb5c229242e364 # Parent 1bb466ce21b82ee5d2020288c6946077f1525986# Parent bc1eb4dacd004bddf897e61a59a1a2a98c4ebc5f merge of '1cebb8e5585732c30dcfb31a6700dcb78ae47b44' and '9e66a21277bce5b8be225115269300903be335ea' diff -r bc1eb4dacd00 -r cfcf5076b73f ChangeLog diff -r bc1eb4dacd00 -r cfcf5076b73f libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Tue Dec 01 21:26:58 2009 +0000 +++ b/libpurple/protocols/jabber/buddy.c Tue Dec 01 21:36:55 2009 +0000 @@ -1870,8 +1870,10 @@ * However, since the gateway might appear offline to us, we cannot get that information. Therefore, I just assume * that gateways on the roster can be identified by having no '@' in their jid. This is a faily safe assumption, since * people don't tend to have a server or other service there. + * + * TODO: Use disco#info... */ - if (g_utf8_strchr(name, -1, '@') == NULL) { + if (strchr(name, '@') == NULL) { act = purple_menu_action_new(_("Log In"), PURPLE_CALLBACK(jabber_buddy_login), NULL, NULL); diff -r bc1eb4dacd00 -r cfcf5076b73f libpurple/protocols/jabber/chat.c --- a/libpurple/protocols/jabber/chat.c Tue Dec 01 21:26:58 2009 +0000 +++ b/libpurple/protocols/jabber/chat.c Tue Dec 01 21:36:55 2009 +0000 @@ -927,7 +927,7 @@ jcm = g_hash_table_lookup(chat->members, who); if (jcm && jcm->jid) jid = jcm->jid; - else if (g_utf8_strchr(who, -1, '@') != NULL) + else if (strchr(who, '@') != NULL) jid = who; else return FALSE; @@ -964,7 +964,7 @@ jcm = g_hash_table_lookup(chat->members, who); if (jcm && jcm->jid) jid = jcm->jid; - else if (g_utf8_strchr(who, -1, '@') != NULL) + else if (strchr(who, '@') != NULL) jid = who; else return FALSE; diff -r bc1eb4dacd00 -r cfcf5076b73f libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Tue Dec 01 21:26:58 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Tue Dec 01 21:36:55 2009 +0000 @@ -1116,7 +1116,8 @@ if(cbdata->js->registration) { username = g_strdup_printf("%s@%s%s%s", cbdata->js->user->node, cbdata->js->user->domain, - cbdata->js->user->resource ? "/" : "", cbdata->js->user->resource); + cbdata->js->user->resource ? "/" : "", + cbdata->js->user->resource ? cbdata->js->user->resource : ""); purple_account_set_username(cbdata->js->gc->account, username); g_free(username); } diff -r bc1eb4dacd00 -r cfcf5076b73f libpurple/protocols/jabber/jingle/session.c --- a/libpurple/protocols/jabber/jingle/session.c Tue Dec 01 21:26:58 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/session.c Tue Dec 01 21:36:55 2009 +0000 @@ -377,7 +377,7 @@ { JingleSession *session = (JingleSession *)value; const gchar *jid = user_data; - gboolean use_bare = g_utf8_strchr(jid, -1, '/') == NULL; + gboolean use_bare = strchr(jid, '/') == NULL; gchar *remote_jid = jingle_session_get_remote_jid(session); gchar *cmp_jid = use_bare ? jabber_get_bare_jid(remote_jid) : g_strdup(remote_jid); @@ -438,7 +438,7 @@ data.jid = jid; data.ret = NULL; - data.use_bare = g_utf8_strchr(jid, -1, '/') == NULL; + data.use_bare = strchr(jid, '/') == NULL; g_hash_table_foreach(js->sessions, find_by_jid_ghr, &data); return data.ret; diff -r bc1eb4dacd00 -r cfcf5076b73f libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Tue Dec 01 21:26:58 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Tue Dec 01 21:36:55 2009 +0000 @@ -433,7 +433,7 @@ JabberPresenceCapabilities *userdata) { JabberBuddyResource *jbr; - char *resource = g_utf8_strchr(userdata->from, -1, '/'); + char *resource = strchr(userdata->from, '/'); if (resource) resource += 1; diff -r bc1eb4dacd00 -r cfcf5076b73f pidgin/plugins/disco/gtkdisco.c --- a/pidgin/plugins/disco/gtkdisco.c Tue Dec 01 21:26:58 2009 +0000 +++ b/pidgin/plugins/disco/gtkdisco.c Tue Dec 01 21:36:55 2009 +0000 @@ -225,8 +225,8 @@ gtk_widget_set_sensitive(dialog->account_widget, FALSE); username = purple_account_get_username(dialog->account); - at = g_utf8_strchr(username, -1, '@'); - slash = g_utf8_strchr(username, -1, '/'); + at = strchr(username, -1, '@'); + slash = strchr(username, -1, '/'); if (at && !slash) { server = g_strdup_printf("%s", at + 1); } else if (at && slash && at + 1 < slash) {