diff libpurple/protocols/jabber/jingle/session.c @ 29112:3d471a4bafac

strchr() is valid on a UTF8 string when searching for an ASCII character
author Paul Aurich <paul@darkrain42.org>
date Tue, 01 Dec 2009 16:49:15 +0000
parents 90361789d5ac
children c38f6e6bf4ce
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/session.c	Tue Dec 01 16:46:57 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/session.c	Tue Dec 01 16:49:15 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;