Mercurial > pidgin.yaz
diff libpurple/protocols/qq/qq_process.c @ 24897:1300601041ac
g_strsplit_set is new in glib 2.4
g_strv_length is new in glib 2.6
This is one reason I didn't get around to making RPMs for 2.5.3, I don't
(yet) know if there are other glib version dependencies to deal with...
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 07 Jan 2009 01:15:36 +0000 |
parents | 8f757b2139d2 |
children | 7f903e67a995 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/qq_process.c Wed Jan 07 01:13:27 2009 +0000 +++ b/libpurple/protocols/qq/qq_process.c Wed Jan 07 01:15:36 2009 +0000 @@ -435,8 +435,8 @@ static void process_server_msg(PurpleConnection *gc, guint8 *data, gint data_len, guint16 seq) { qq_data *qd; - guint8 *data_str; - gchar **segments; + guint8 *data_str, i = 0; + gchar **segments, **seg; gchar *funct_str, *from, *to; gint bytes, funct; @@ -448,9 +448,11 @@ g_memmove(data_str, data, data_len); data_str[data_len] = 0x00; - segments = g_strsplit_set((gchar *) data_str, "\x1f", 0); + segments = g_strsplit((gchar *) data_str, "\x1f", 0); g_return_if_fail(segments != NULL); - if (g_strv_length(segments) < 3) { + for (seg = segments; *seg != NULL; seg++) + i++; + if (i < 3) { purple_debug_warning("QQ", "Server message segments is less than 3\n"); g_strfreev(segments); return;