pidgin.openq: 6ac99f1b: Correct QQ2005's login reply length
ccpaging at pidgin.im
ccpaging at pidgin.im
Wed Dec 3 23:21:16 EST 2008
-----------------------------------------------------------------
Revision: 6ac99f1bd22867f43df93ba3a410086fd0242f8b
Ancestor: 26a0ca05ade33ea156efba33afdaa7d6386b8d54
Author: ccpaging at pidgin.im
Date: 2008-11-11T07:19:28
Branch: im.pidgin.pidgin.openq
URL: http://d.pidgin.im/viewmtn/revision/info/6ac99f1bd22867f43df93ba3a410086fd0242f8b
Modified files:
libpurple/protocols/qq/qq_base.c
ChangeLog:
Correct QQ2005's login reply length
Change QQ number to unsigned long
-------------- next part --------------
============================================================
--- libpurple/protocols/qq/qq_base.c 0fde318dcc1d9809e43e1dd559733750312fa290
+++ libpurple/protocols/qq/qq_base.c ae7d9632a6fc726bd23b9db7182b3ccb6946aa30
@@ -68,7 +68,8 @@ static gint8 process_login_ok(PurpleConn
qd = (qq_data *) gc->proto_data;
/* qq_show_packet("Login reply", data, len); */
- if (len < 139) {
+ if (len < 148) {
+ qq_show_packet("Login reply OK, but length < 139", data, len);
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
_("Can not decrypt get server reply"));
@@ -82,7 +83,7 @@ static gint8 process_login_ok(PurpleConn
purple_debug_info("QQ", "Got session_key\n");
bytes += qq_get32(&uid, data + bytes);
if (uid != qd->uid) {
- purple_debug_warning("QQ", "My uid in login reply is %d, not %d\n", uid, qd->uid);
+ purple_debug_warning("QQ", "My uid in login reply is %u, not %u\n", uid, qd->uid);
}
bytes += qq_getIP(&qd->my_ip, data + bytes);
bytes += qq_get16(&qd->my_port, data + bytes);
@@ -137,8 +138,8 @@ static gint8 process_login_ok(PurpleConn
tm_local->tm_hour, tm_local->tm_min, tm_local->tm_sec);
/* unknow 9 bytes, 0x(00 0a 00 0a 01 00 00 0e 10) */
- if (len > 139) {
- purple_debug_warning("QQ", "Login reply more than expected %d bytes, read %d bytes\n", 139, bytes);
+ if (len > 148) {
+ qq_show_packet("Login reply OK, but length > 139", data, len);
}
return QQ_LOGIN_REPLY_OK;
}
@@ -330,7 +331,7 @@ guint8 qq_process_token(PurpleConnection
if (bytes + token_len > buf_len) {
purple_debug_info("QQ", "Extra token data, %d %d\n", token_len, buf_len - bytes);
}
- qq_show_packet("Got token", buf + bytes, buf_len - bytes);
+ /* qq_show_packet("Got token", buf + bytes, buf_len - bytes); */
if (qd->ld.token != NULL) {
g_free(qd->ld.token);
@@ -1279,7 +1280,7 @@ guint8 qq_process_login_2007( PurpleConn
bytes += qq_get32(&uid, data + bytes);
if (uid != qd->uid) {
- purple_debug_warning("QQ", "My uid in login reply is %d, not %d\n", uid, qd->uid);
+ purple_debug_warning("QQ", "My uid in login reply is %u, not %u\n", uid, qd->uid);
}
bytes += qq_getIP(&qd->my_ip, data + bytes);
bytes += qq_get16(&qd->my_port, data + bytes);
@@ -1468,7 +1469,7 @@ guint8 qq_process_login_2008( PurpleConn
bytes += qq_get32(&uid, data + bytes);
if (uid != qd->uid) {
- purple_debug_warning("QQ", "My uid in login reply is %d, not %d\n", uid, qd->uid);
+ purple_debug_warning("QQ", "My uid in login reply is %u, not %u\n", uid, qd->uid);
}
bytes += qq_getIP(&qd->my_ip, data + bytes);
bytes += qq_get16(&qd->my_port, data + bytes);
More information about the Commits
mailing list