libpurple/protocols/qq/keep_alive.c

branch
release-2.4.3
changeset 23190
ce258cadbd9e
parent 22685
f3a524370c38
child 23192
2f00b04db5cb
--- a/libpurple/protocols/qq/keep_alive.c	Sat Jun 21 16:34:02 2008 +0000
+++ b/libpurple/protocols/qq/keep_alive.c	Tue Jun 24 11:58:57 2008 +0000
@@ -49,16 +49,15 @@
 void qq_send_packet_keep_alive(PurpleConnection *gc)
 {
 	qq_data *qd;
-	guint8 *raw_data, *cursor;
+	guint8 raw_data[16] = {0};
+	gint bytes= 0;
 
 	qd = (qq_data *) gc->proto_data;
-	raw_data = g_newa(guint8, 4);
-	cursor = raw_data;
 
 	/* In fact, we can send whatever we like to server
 	 * with this command, server return the same result including
 	 * the amount of online QQ users, my ip and port */
-	create_packet_dw(raw_data, &cursor, qd->uid);
+	bytes += qq_put32(raw_data + bytes, qd->uid);
 
 	qq_send_cmd(gc, QQ_CMD_KEEP_ALIVE, TRUE, 0, TRUE, raw_data, 4);
 }

mercurial