| 217 |
217 |
| 218 /* when we receive a message, |
218 /* when we receive a message, |
| 219 * we send an ACK which is the first 16 bytes of incoming packet */ |
219 * we send an ACK which is the first 16 bytes of incoming packet */ |
| 220 static void _qq_send_packet_recv_im_ack(PurpleConnection *gc, guint16 seq, guint8 *data) |
220 static void _qq_send_packet_recv_im_ack(PurpleConnection *gc, guint16 seq, guint8 *data) |
| 221 { |
221 { |
| 222 qq_send_cmd(gc, QQ_CMD_RECV_IM, FALSE, seq, FALSE, data, 16); |
222 qq_data *qd; |
| |
223 |
| |
224 qd = (qq_data *) gc->proto_data; |
| |
225 qq_send_cmd_detail(qd, QQ_CMD_RECV_IM, seq, FALSE, data, 16); |
| 223 } |
226 } |
| 224 |
227 |
| 225 /* read the common parts of the normal_im, |
228 /* read the common parts of the normal_im, |
| 226 * returns the bytes read if succeed, or -1 if there is any error */ |
229 * returns the bytes read if succeed, or -1 if there is any error */ |
| 227 static gint _qq_normal_im_common_read(guint8 *data, gint len, qq_recv_normal_im_common *common) |
230 static gint _qq_normal_im_common_read(guint8 *data, gint len, qq_recv_normal_im_common *common) |
| 518 bytes += qq_putdata(raw_data + bytes, send_im_tail, tail_len); |
521 bytes += qq_putdata(raw_data + bytes, send_im_tail, tail_len); |
| 519 |
522 |
| 520 qq_show_packet("QQ_raw_data debug", raw_data, bytes); |
523 qq_show_packet("QQ_raw_data debug", raw_data, bytes); |
| 521 |
524 |
| 522 if (bytes == raw_len) /* create packet OK */ |
525 if (bytes == raw_len) /* create packet OK */ |
| 523 qq_send_cmd(gc, QQ_CMD_SEND_IM, TRUE, 0, TRUE, raw_data, bytes); |
526 qq_send_cmd(qd, QQ_CMD_SEND_IM, raw_data, bytes); |
| 524 else |
527 else |
| 525 purple_debug(PURPLE_DEBUG_ERROR, "QQ", |
528 purple_debug(PURPLE_DEBUG_ERROR, "QQ", |
| 526 "Fail creating send_im packet, expect %d bytes, build %d bytes\n", raw_len, bytes); |
529 "Fail creating send_im packet, expect %d bytes, build %d bytes\n", raw_len, bytes); |
| 527 |
530 |
| 528 if (font_color) |
531 if (font_color) |